[pulseaudio-discuss] volume ramping
lennart at poettering.net
Thu Dec 11 10:04:44 PST 2008
On Thu, 11.12.08 09:56, Baek Chang (baeksan at ccrma.stanford.edu) wrote:
> What is the proper way to do volume ramping in pulse audio to avoid clicking
> when changed the volume? I wrote a module to callback and change the volume
> in small incremental steps, but it seems that pulse seems to apply the
> volume changes on the audio buffer as a whole. Does pulseaudio take a
> volume command, and then process the one audio buffer with that set volume?
> I'm using a buffer size of 4096 at 44100Hz, so it is about 10mS. So how
> would I go about ramping the volume, in say about 15 mS?
Volumes are applied block-by-block. The Block size is variable and
depends on the sound device and the application used.
I wrote some code to implement volume "envelopes" for this. The code
is there, it's even included in the tarball. But it's not hooked
up. And until I finish that I fear, no: we cannot do volume ramping.
Lennart Poettering Red Hat, Inc.
lennart [at] poettering [dot] net ICQ# 11060553
http://0pointer.net/lennart/ GnuPG 0x1A015CC4
More information about the pulseaudio-discuss