[vlc-devel] [PATCH] Add Scaletempo audio filter

Remi Denis-Courmont rdenis at simphalempin.com
Thu Jun 19 14:19:51 CEST 2008


On Thu, 19 Jun 2008 08:09:19 -0400, Rov Juvano
<rovjuvano at users.sourceforge.net> wrote:
> Because these values are independent of each other, are used
> only within reinit_buffers, and then used only once, the worse
> case scenario would be a delay for them taking effect, right?

On the fast (i.e. uncontended) path, acquiring a mutex or a spin is very
fast an operation on any modern operating system. It's just an atomic
compare&swap and a memory barrier.

And that's the whole point: you need a memory barrier. Also, you probably
want to ensure that changing the values is done atomically.

> Duh.  I saw this other places but should have known better.

Ivoire and jpsaman has been hunting them, but there are some left yeah.

-- 
Rémi Denis-Courmont
http://www.remlab.net




More information about the vlc-devel mailing list