<div class="gmail_quote">On Mon Jan 26 2015 at 20:45:31 Rémi Denis-Courmont <<a href="mailto:remi@remlab.net">remi@remlab.net</a>> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Le lundi 26 janvier 2015, 19:34:19 Mark Lee a écrit :<br>
> I use libvlc_audio_output_device_<u></u>enum() to build a menu in my LibVLC<br>
> application with a menu item for each returned audio output device.<br>
><br>
> The problem is how to determine which audio output device is currently<br>
> the active one, and consequently which menu item to show as selected.<br>
<br>
> This patch adds a complementary API to libvlc_audio_output_device_<u></u>set()<br>
> to get the identifier of the currently active audio device (if there is<br>
> one).<br>
<br>
The problem is how do you know when to query that. The active device can<br>
change without a call to libvlc_audio_output_device_<u></u>set(), and worse yet, the<br>
initial value is likely unset/unknown.<br></blockquote><div><br></div><div>Hmm... I didn't realise it might never be set.</div><div><br></div><div>What I observed in my testing was that it *was* set without my own application explicitly setting it so I just assumed, incorrectly as you point out, that that was always the case.</div><div> <br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">This is not much of an issue if the menu is populated just before it is shown,<br>
like the VLC UI does.</blockquote><div><br>This is precisely my use-case.<br> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"> It is an issue if the application wants to keep track of<br>
devices though.<br>
<br>
I am fine with the code, but there should be more explicit warnings in the<br>
Doxygen.<br></blockquote><div><br></div><div>Thanks.</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
--<br>
Rémi Denis-Courmont<br>
<a href="http://www.remlab.net/" target="_blank">http://www.remlab.net/</a><br>
<br>
</blockquote></div>