[vorbis-dev]Newbie question
John Edwards
john.edwards33 at ntlworld.com
Tue Jan 21 05:51:39 PST 2003
Better to use ov_read_float in your decoder, then you get your samples
returned in the range -1.00 - +1.00 and you can do as you wish with them!!
John
----- Original Message -----
From: "Rob D" <rddone at att.net>
To: <vorbis-dev at xiph.org>
Sent: Tuesday, January 21, 2003 3:10 AM
Subject: RE: [vorbis-dev]Newbie question
<p>> 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
>
>
> --- >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.
>
<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