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. --- TOOLS/lua/audio-hotplug-test.lua | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'TOOLS') diff --git a/TOOLS/lua/audio-hotplug-test.lua b/TOOLS/lua/audio-hotplug-test.lua index 8dedc68cbe..f27b793151 100644 --- a/TOOLS/lua/audio-hotplug-test.lua +++ b/TOOLS/lua/audio-hotplug-test.lua @@ -6,3 +6,8 @@ mp.observe_property("audio-device-list", "native", function(name, val) print(" - '" .. e.name .. "' (" .. e.description .. ")") end end) + +mp.observe_property("audio-out-detected-device", "native", function(name, val) + print("Detected audio device changed:") + print(" - '" .. val) +end) -- cgit v1.2.3