From 70802d519f9130696959346aa413f7faeeed7621 Mon Sep 17 00:00:00 2001 From: Stefano Pigozzi Date: Sat, 14 Feb 2015 12:43:55 +0100 Subject: ao_coreaudio: add support for hotplug notifications This commit adds notifications for hot plugging of devices. It also extends the old behaviour of the `audio-out-detected-device` property which is now backed by the hotplugging code. This allows clients to be notified when the actual audio output device changes. Maybe hotplugging should be supported for ao_coreaudio_exclusive too, but it's device selection code is a bit fragile. --- audio/out/ao.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'audio/out/ao.h') diff --git a/audio/out/ao.h b/audio/out/ao.h index 7b85ec80ba..3a028bb402 100644 --- a/audio/out/ao.h +++ b/audio/out/ao.h @@ -80,7 +80,6 @@ void ao_uninit(struct ao *ao); void ao_get_format(struct ao *ao, struct mp_audio *format); const char *ao_get_name(struct ao *ao); const char *ao_get_description(struct ao *ao); -const char *ao_get_detected_device(struct ao *ao); bool ao_untimed(struct ao *ao); int ao_play(struct ao *ao, void **data, int samples, int flags); int ao_control(struct ao *ao, enum aocontrol cmd, void *arg); @@ -100,6 +99,7 @@ struct ao_hotplug *ao_hotplug_create(struct mpv_global *global, struct input_ctx *input_ctx); void ao_hotplug_destroy(struct ao_hotplug *hp); bool ao_hotplug_check_update(struct ao_hotplug *hp); +const char *ao_hotplug_get_detected_device(struct ao_hotplug *hp); struct ao_device_list *ao_hotplug_get_device_list(struct ao_hotplug *hp); void ao_print_devices(struct mpv_global *global, struct mp_log *log); -- cgit v1.2.3