[vlc-devel] Volume change lag fix for OS X CoreAudio [auhal]
fkuehne.videolan at googlemail.com
Mon Mar 5 15:07:38 CET 2012
On Mon, Mar 5, 2012 at 9:09 AM, Jon Stacey <jon at jonsview.com> wrote:
> Hello everyone,
> I have just submitted a patch to fix the volume lag problem in the auhal audio output module: https://trac.videolan.org/vlc/ticket/5605#comment:7 The patch needs to be reviewed, and tested more broadly on older versions of OS X.
As Rémi said, the patch looks okay and it works correctly for me on
10.7. I still need to test it on 10.5 and 10.6.
> I am using the kHALOutputParam_Volume parameter and the cubic mapping volume adjustment from output.c. [volume = volume * volume * volume]. This value ranges from 0 to 8. The Apple documentation says that this parameter is a linear gain from 0 through 1, but it seems to work just fine with the cubic mapping on the 10.7 SDK. It's possible this documentation is wrong, or referring to an older SDK, but testing is needed on any older versions of VLC that we want to support.
I think the documentation is misleading here, since 1.0 appears to be
the default value. By browsing the used auhal switch, there seem to be
quite a few projects, which use it with parameters larger than 1.0 and
it appears to be working.
Possibly, you could get some artifacts when amplifying really silent
stuff too much, but that's already the case with VLC's internal code,
so it's fine. IMO, there is no clever to circumvent that.
More information about the vlc-devel