mpv/audio/out
wm4 f061befb33 audio: add device change notification for hotplugging
Not very important for the command line player; but GUI applications
will want to know about this.

This only adds the internal API; support for specific audio outputs
comes later.

This reuses the ao struct as context for the hotplug event listener,
similar to how the "old" device listing API did. This is probably a bit
unclean and confusing. One argument got reusing it is that otherwise
rewriting parts of ao_pulse would be required (because the PulseAudio
API requires so damn much boilerplate). Another is that --ao-defaults is
applied to the hotplug dummy ao struct, which automatically applies such
defaults even to the hotplug context.

Notification works through the property observation mechanism in the
client API. The notification chain is a bit complicated: the AO notifies
the player, which in turn notifies the clients, which in turn will
actually retrieve the device list. (It still has the advantage that it's
slightly cleaner, since the AO stuff doesn't need to know about client
API issues.)

The weird handling of atomic flags in ao.c is because we still don't
require real atomics from the compiler. Otherwise we'd just use atomic
bitwise operations.
2015-02-12 17:17:41 +01:00
..
ao.c audio: add device change notification for hotplugging 2015-02-12 17:17:41 +01:00
ao.h audio: add device change notification for hotplugging 2015-02-12 17:17:41 +01:00
ao_alsa.c ao_alsa: reinitialize if device got broken 2015-01-21 19:38:18 +01:00
ao_coreaudio.c ao_coreaudio: use device UID instead of ID for selection 2015-02-03 00:40:02 +01:00
ao_coreaudio_exclusive.c audio/out: consistently use double return type for get_delay 2014-11-09 11:45:04 +01:00
ao_coreaudio_properties.c ao_coreaudio: use device UID instead of ID for selection 2015-02-03 00:40:02 +01:00
ao_coreaudio_properties.h ao_coreaudio: report hardware latency to ao_read_data 2014-07-03 20:05:15 +02:00
ao_coreaudio_utils.c ao_coreaudio: fix small memory leak 2015-02-03 00:40:02 +01:00
ao_coreaudio_utils.h ao_coreaudio: use device UID instead of ID for selection 2015-02-03 00:40:02 +01:00
ao_dsound.c win32: request UTF-16 API variants, Vista+ APIs, and COM C macros 2015-01-07 21:42:44 +01:00
ao_jack.c audio/out/pull: remove race conditions 2014-05-29 02:24:17 +02:00
ao_lavc.c ao_lavc: fix setting up AVFrame pointers 2014-11-21 10:09:25 +01:00
ao_null.c ao_null: add emulation for certain broken behavior 2015-01-30 21:30:54 +01:00
ao_openal.c audio/out: consistently use double return type for get_delay 2014-11-09 11:45:04 +01:00
ao_oss.c Do not call strerror() 2014-11-26 21:21:56 +01:00
ao_pcm.c ao_pcm: add append mode 2015-01-14 22:14:56 +01:00
ao_pulse.c ao_pulse: plug a memory leak 2015-01-25 01:26:11 +01:00
ao_rsound.c audio/out: consistently use double return type for get_delay 2014-11-09 11:45:04 +01:00
ao_sdl.c Add some missing "const"s 2014-10-10 13:44:08 +02:00
ao_sndio.c audio/out: consistently use double return type for get_delay 2014-11-09 11:45:04 +01:00
ao_wasapi.c win32: request UTF-16 API variants, Vista+ APIs, and COM C macros 2015-01-07 21:42:44 +01:00
ao_wasapi.h win32: request UTF-16 API variants, Vista+ APIs, and COM C macros 2015-01-07 21:42:44 +01:00
ao_wasapi_changenotify.c win32: request UTF-16 API variants, Vista+ APIs, and COM C macros 2015-01-07 21:42:44 +01:00
ao_wasapi_utils.c ao_wasapi: fix try_format logic in shared mode 2015-01-23 22:02:15 +11:00
ao_wasapi_utils.h ao/wasapi: use IsEqualGUID and IsEqualPropertyKey 2014-12-16 03:29:51 -08:00
internal.h audio: add device change notification for hotplugging 2015-02-12 17:17:41 +01:00
pull.c audio/out/pull: avoid deadlock if audio callback stops 2014-11-09 15:23:40 +01:00
push.c audio/out/push: fix off-by-one error 2014-11-21 03:50:57 +01:00