[Vorbis-dev] ogg123 volume?
John Morton
jwm
Thu Jun 17 08:35:15 PDT 2004
<200406162305.33372.graham at grahammitchell.com>
Message-ID: <200406180335.15254.jwm at eslnz.co.nz>
On Thu, 17 Jun 2004 16:05, Graham Mitchell wrote:
> > I need to adjust the output volume from ogg123 the same way that
> > mpg123 has the "-f n change scalefactor [32768]" option.
>
> Well, back in the day, I was thinking about adding replaygain support to
> ogg123 (though someone has since beat me to it), and here's what I was
> told by Stan Seibert on irc:
>
> * You'll be editing oggvorbis_format.c:ovf_read()
>
> * Use ov_read_float() instead of ov_read() so you can do your scaling
> before you quantize.
>
> * Oh, and I swiped the loops from vorbisfile.c in the vorbis libraries to
> convert the floats to integers.
>
> * It is okay to modify (in your case, scale all the samples) directly in
> the float buffer ov_read_float() gives you.
>
> * For some reason, I thought I had to copy the floats out before I could
> multiply.
This is roughly what I did for vgplay.c, which is what the ogg123 patch here,
does:
http://www.nongnu.org/vgplay/
However, I never got around to cleaning up the file areas after savannah's big
post hack security crack down, so you have to grab it from CVS for another
day or so (and remember to run automake before building).
Any particular reason not to have it applied to Xiph vorbis-tools, Stan? I
understand that Xiph doesn't want to have to concern itself with maintaining
Replaygain as a whole, but you could treat the patch as being a preamp with
simple limiting that happens to know about common replaygain tags.
John
More information about the Vorbis-dev
mailing list