Re: What's the value range of float samples?
Joost van Dongen <[email protected]> Thu, 10 Jan 2013 17:17:27 +0100
| Newsgroups | gmane.comp.multimedia.ogg.vorbis.general |
|---|---|
| Message-ID | <CAKETh1Rn2ZW89pku2_a42Hd0uPVb99f6cVLPA1ke_=0tEj1X5A@mail.gmail.com> |
We had audible problems with this in both Swords & Soldiers and Awesomenauts. As Paul suggested, we worked around it by simply multiplying all our samples to get them back in the -1,1 range. We multiply by something like 0.9 or 0.99, don't remember the number exactly. Greetz, Joost - Joost van Dongen Lead programmer / co-founder Ronimo Gameswww.ronimo-games.com On 10 January 2013 17:10, Paul Martin <[email protected]> wrote: > On Mon, Jan 07, 2013 at 11:50:20PM +0200, Nikos Chantziaras wrote: > > On 07/01/13 23:23, Paul Martin wrote: > > > On Mon, Jan 07, 2013 at 08:53:56PM +0200, Nikos Chantziaras wrote: > > > > > >> Apparently, there are Vorbis streams that use float samples with > values > > >> in the range of [-32768, 32767]? > > > > > > GIGO. > > > > So the answer is no? Vorbis float values always have a nominal range of > > [-1,1) and I can always clamp/clip to that? > > If you feed in "normalized to full scale" values to any lossy encoder, > you are likely to get overshoots on decoding. It's good to be aware > that this might happen and to do your volume scaling (playback gain) > in the floating point domain before you convert to integers. > > You'll often notice this on YouTube videos where they clip audibly on > playback due to insufficient headroom. > > -- > Paul Martin <[email protected]> > _______________________________________________ > Vorbis mailing list > [email protected] > http://lists.xiph.org/mailman/listinfo/vorbis > _______________________________________________ Vorbis mailing list [email protected] http://lists.xiph.org/mailman/listinfo/vorbis