Extension to libvorbis for lossless volume changes
[email protected] Fri, 15 May 2015 12:01:14 +0200
| Newsgroups | gmane.comp.multimedia.ogg.vorbis.devel |
|---|---|
| Message-ID | <[email protected]> |
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