History

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.

Stefano Pigozzi committed 11 years ago

Commit 70802d51 parent 9aaec7c6 files · +111 −27Browse files

Showing the changes to TOOLS/lua/audio-hotplug-test.lua (1 of 6 files). Show all

Unified · Split

TOOLS/lua/audio-hotplug-test.lua+5−0
@@ -6,3 +6,8 @@ mp.observe_property("audio-device-list", "native", function(name, val) · 5 unmodified lines
66 print(" - '" .. e.name .. "' (" .. e.description .. ")")
77 end
88 end)
9+
10+mp.observe_property("audio-out-detected-device", "native", function(name, val)
11+ print("Detected audio device changed:")
12+ print(" - '" .. val)
13+end)

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t