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.<div>
<br></div><div>Greetz,</div><div>Joost<br clear="all"><div><pre>-
Joost van Dongen
Lead programmer / co-founder
Ronimo Games
<a href="http://www.ronimo-games.com/" target="_blank">www.ronimo-games.com</a>
</pre></div>
<div><br></div><div><br></div><br><br><div class="gmail_quote">On 10 January 2013 17:10, Paul Martin <span dir="ltr"><<a href="mailto:pm@nowster.me.uk" target="_blank">pm@nowster.me.uk</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div class="im">On Mon, Jan 07, 2013 at 11:50:20PM +0200, Nikos Chantziaras wrote:<br>
> On 07/01/13 23:23, Paul Martin wrote:<br>
> > On Mon, Jan 07, 2013 at 08:53:56PM +0200, Nikos Chantziaras wrote:<br>
> ><br>
> >> Apparently, there are Vorbis streams that use float samples with values<br>
> >> in the range of [-32768, 32767]?<br>
> ><br>
> > GIGO.<br>
><br>
> So the answer is no? Vorbis float values always have a nominal range of<br>
> [-1,1) and I can always clamp/clip to that?<br>
<br>
</div>If you feed in "normalized to full scale" values to any lossy encoder,<br>
you are likely to get overshoots on decoding. It's good to be aware<br>
that this might happen and to do your volume scaling (playback gain)<br>
in the floating point domain before you convert to integers.<br>
<br>
You'll often notice this on YouTube videos where they clip audibly on<br>
playback due to insufficient headroom.<br>
<span class="HOEnZb"><font color="#888888"><br>
--<br>
Paul Martin <<a href="mailto:pm@nowster.me.uk">pm@nowster.me.uk</a>><br>
</font></span><div class="HOEnZb"><div class="h5">_______________________________________________<br>
Vorbis mailing list<br>
<a href="mailto:Vorbis@xiph.org">Vorbis@xiph.org</a><br>
<a href="http://lists.xiph.org/mailman/listinfo/vorbis" target="_blank">http://lists.xiph.org/mailman/listinfo/vorbis</a><br>
</div></div></blockquote></div><br></div>