diff options
Diffstat (limited to 'TOOLS')
-rw-r--r-- | TOOLS/lua/README.md | 2 | ||||
-rw-r--r-- | TOOLS/lua/audio-hotplug-test.lua | 8 |
2 files changed, 10 insertions, 0 deletions
diff --git a/TOOLS/lua/README.md b/TOOLS/lua/README.md index f7cdf2a590..e9044823cd 100644 --- a/TOOLS/lua/README.md +++ b/TOOLS/lua/README.md @@ -10,3 +10,5 @@ to mpv's command line. Where appropriate, they may also be placed in ~/.config/mpv/scripts/ from where they will be automatically loaded when mpv starts. + +Some of these are just for testing mpv internals. diff --git a/TOOLS/lua/audio-hotplug-test.lua b/TOOLS/lua/audio-hotplug-test.lua new file mode 100644 index 0000000000..8dedc68cbe --- /dev/null +++ b/TOOLS/lua/audio-hotplug-test.lua @@ -0,0 +1,8 @@ +local utils = require("mp.utils") + +mp.observe_property("audio-device-list", "native", function(name, val) + print("Audio device list changed:") + for index, e in ipairs(val) do + print(" - '" .. e.name .. "' (" .. e.description .. ")") + end +end) |