[vlc-devel] Interesting issue with Mac audio devices

Ron Frederick ronf at timeheart.net
Mon Sep 3 18:53:13 CEST 2012


Now that I'm using HDMI audio out from my Mac to my TV, I've noticed an interesting problem with VLC. Whenever I power the TV on & off, the Mac loses track of the audio device corresponding to the HDMI audio out. Later, when the TV is turned back on, a new audio device is added, but it has a different device ID than it did before. With the way VLC is currently designed, this generally causes it to fall back to the default audio output, and I need to manually select the HDMI audio out again after I begin playing a file (since you can't change the audio output when nothing is being played).

This issue with device IDs not being stable also affects the VLC preferences for default audio device. While there's a preference for "macosx-audio-device", the fact that device numbers can change over time makes it difficult to use this. Also, the way it works right now you need to know details of VLC internals if you want to select an audio device and enable SPDIF encoded output by default. VLC does this by adding 0xF00000 to the device ID, and you so end up with a preference value of something like 15728712 (0xF00048) if the device ID you want is 0x48.

It would be great if VLC could store the preferred audio device as something like a string value, matching what appears in the "Audio Device" menu. That way, each time it begins a new playback, it could iterate through all of the currently available audio devices and try to match the value the user had selected before, even if the device ID had changed. Also, since there are separate menu items in this menu for the "encoded output" of devices capable of that, it would avoid the issue above about needing to know the VLC internal device numbering for that.

Does this seem like a reasonable change? If so, I may see if I can check out the latest sources and take a crack at it.
-- 
Ron Frederick
ronf at timeheart.net

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.videolan.org/pipermail/vlc-devel/attachments/20120903/230ce514/attachment.html>


More information about the vlc-devel mailing list