[MPlayer-users] Volume Control Suggestion

Stephen Davies steve at daviesfam.org
Tue Jan 1 11:27:19 CET 2002


On Tue, 1 Jan 2002, Hui Zhang wrote:

> So having said what exactly I'd like to see it working, I think modifying
> the sample is the only way to go.  Let me know if disagree.  Now the
> question is how to do that.

Write a plugin.  Honestly - its easy.  The audio will be in regular PCM
sample format ready to go to the sound card, you can do the scaling using
floating point:

  *sample = (double)(*sample) * 0.5;

or using fixed point binary:

  *sample = (*sample*32768)>>16;

(Where 32768 = 0.5 * 2^16)

Steve





More information about the MPlayer-users mailing list