diff options
author | Stefano Pigozzi <stefano.pigozzi@gmail.com> | 2015-02-14 12:43:55 +0100 |
---|---|---|
committer | Stefano Pigozzi <stefano.pigozzi@gmail.com> | 2015-02-14 12:51:15 +0100 |
commit | 70802d519f9130696959346aa413f7faeeed7621 (patch) | |
tree | 130639c7880b1495b2b43d31480705733989c899 /TOOLS/lua | |
parent | 9aaec7cffb2fb1543d4c3cabb55165f606c0b87d (diff) | |
download | mpv-70802d519f9130696959346aa413f7faeeed7621.tar.bz2 mpv-70802d519f9130696959346aa413f7faeeed7621.tar.xz |
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.
Diffstat (limited to 'TOOLS/lua')
-rw-r--r-- | TOOLS/lua/audio-hotplug-test.lua | 5 |
1 files changed, 5 insertions, 0 deletions
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) |