[MPlayer-users] Volume Control Suggestion

Stephen Davies steve at daviesfam.org
Mon Dec 31 12:33:09 CET 2001


On Mon, 31 Dec 2001, Hui Zhang wrote:

> I tried to hack it by multiplying or deviding 2 off the numbers stored in
> the buffer retrieved from decode_audio.  It seems to have the effect
> of doubling the volume with multiplying, but the effect of deviding leaves
> me with just added noises.  I guess it is not trivial to do.  Any opinion
> from expert?  But I do think it is a legit and useful feature to have, if
> multiple sound generating programs can share the sound in a civil way.
> I know windows media player does that.


Why don't you write a "volume" plugin?  You can look at the existing
libao2/pl_... files to see how plugins work.

Adjusting volume is a simple matter of multiplying each sample by a factor
between 0 and 1.  More than 1 might be useful for some amplification.

Steve





More information about the MPlayer-users mailing list