[vlc-devel] Volume change lag fix for OS X CoreAudio [auhal]

Rémi Denis-Courmont remi at remlab.net
Mon Mar 5 15:42:43 CET 2012


On Mon, 05 Mar 2012 09:32:15 +0100, Rémi Denis-Courmont <remi at remlab.net>
wrote:
> On Mon, 5 Mar 2012 02:25:39 -0600, Jon Stacey <jon at jonsview.com> wrote:
>> 2. I don't think CoreAudio is thread safe, but I think we're good here
>> since we're outside the render callback.
> 
> How so?

To be clear, the VLC core ensures with the aout_lock that VolumeSet and
other VLC audio output callbacks (e.g. Play & Pause) are all exclusive.

Also aout_Packet*() functions are internally protected against concurrent
access to the same aout_packet_t. In this case, Play/Pause/Flush and the
CoreAudio render callback should be properly interlocked.

But I don't see what protects the VolumeSet callback and the CoreAudio
render callback from concurrent access to CoreAudio APIs? Unless CoreAudio
is thread-safe _or_ I missed some trick, this is a bug.

-- 
Rémi Denis-Courmont
Sent from my collocated server



More information about the vlc-devel mailing list