diff options
author | wm4 <wm4@nowhere> | 2014-10-09 21:21:31 +0200 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2014-10-09 21:21:31 +0200 |
commit | 35649a990a5d468b6e9539c9e362d1e5a351c9c4 (patch) | |
tree | 31b1f76c5c219cfeaa0360c09122bfc45c4b90b7 /audio/out/internal.h | |
parent | 89890192711e1478e7626df6f8eb2a7ecb117342 (diff) | |
download | mpv-35649a990a5d468b6e9539c9e362d1e5a351c9c4.tar.bz2 mpv-35649a990a5d468b6e9539c9e362d1e5a351c9c4.tar.xz |
audio: add device selection & listing with --audio-device
Not sure how good of an idea this is.
This commit doesn't add support for this to any AO yet; the AO
implementations will follow later.
Diffstat (limited to 'audio/out/internal.h')
-rw-r--r-- | audio/out/internal.h | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/audio/out/internal.h b/audio/out/internal.h index a17aa10f02..399a8ee8b4 100644 --- a/audio/out/internal.h +++ b/audio/out/internal.h @@ -50,6 +50,11 @@ struct ao { struct input_ctx *input_ctx; struct mp_log *log; // Using e.g. "[ao/coreaudio]" as prefix + // The device as selected by the user, usually using ao_device_desc.name + // from an entry from the list returned by driver->list_devices. If the + // default device should be used, this is set to NULL. + char *device; + int buffer; double def_buffer; void *api_priv; @@ -147,6 +152,11 @@ struct ao_driver { // In combination with wait(). Lock may or may not be held. void (*wakeup)(struct ao *ao); + // Return the list of devices currently available in the system. Use + // ao_device_list_add() to add entries. The selected device will be set as + // ao->device (using ao_device_desc.name). + void (*list_devs)(const struct ao_driver *d, struct ao_device_list *list); + // For option parsing (see vo.h) int priv_size; const void *priv_defaults; @@ -167,4 +177,8 @@ bool ao_chmap_sel_adjust(struct ao *ao, const struct mp_chmap_sel *s, bool ao_chmap_sel_get_def(struct ao *ao, const struct mp_chmap_sel *s, struct mp_chmap *map, int num); +// Add a deep copy of e to the list. +void ao_device_list_add(struct ao_device_list *list, const struct ao_driver *d, + struct ao_device_desc *e); + #endif |