[Vorbis-dev] Extension to libvorbis for lossless volume changes
xiph-mueller at maazl.de
xiph-mueller at maazl.de
Fri May 15 03:01:14 PDT 2015
I added a new function to libvorbis that allows lossless changes of the
volume to an vorbis_block. This can help to get reasonable loudness on
hardware players that do not support the Replay Gain tags.
int vorbis_gainadj(vorbis_block *vb, ogg_packet *op, float* dbgain);
dbgain contains the relative adjustment for each channel.
The trick is quite simple. I adjust the first 2 floor values for each
channel if they are nonzero. Of course, it only works with floor type 1
and returns an error with floor 0. But I have never seen any files with
floor 0.
It is quite straight forward to extend vorbisgain with this function to
modify the gain values to fit the loudness coarsely.
Is there any interest to add this function to the libvorbis code?
And if so, how to do this?
Marcel
More information about the Vorbis-dev
mailing list