[vorbis-dev]Newbie question

Rob D rddone at att.net
Mon Jan 20 19:10:59 PST 2003



I found a way to hack in a volume.

I made ov_get_vol and ov_set_vol that takes a floating value, and sets a
float value used to scale the results from the 5 vorbis_ftoi calls in
vorbisfile.c

The original multiplied the results from the vorbis_ftoi by 128 or 32768
depending on word size. I just replaced the hardcoded value with the
resulting value in the set_vol routine.

This should be a very minor performance impact, multiplying by a variable as
opposed to a hardcoded value. Maybe no impact, depending on compiler.

I just stored the variable as a global in vorbisfile.c, as I am not familiar
enough with the modules yet to know exactly where it should be declared.

The bottom line is that it was a successful hack, and I believe the idea
behind it is sound enough to integrate into future releases, but not exactly
as I have implemeted.

Rob D

<p>--- >8 ----
List archives:  http://www.xiph.org/archives/
Ogg project homepage: http://www.xiph.org/ogg/
To unsubscribe from this list, send a message to 'vorbis-dev-request at xiph.org'
containing only the word 'unsubscribe' in the body.  No subject is needed.
Unsubscribe messages sent to the list will be ignored/filtered.



More information about the Vorbis-dev mailing list