diff -r 0a77d2fc95ad -r 8c9cbb623d55 src/audio/sdlgenaudiocvt.pl --- a/src/audio/sdlgenaudiocvt.pl Sat Sep 18 17:12:19 2010 -0700 +++ b/src/audio/sdlgenaudiocvt.pl Sat Sep 18 18:15:08 2010 -0700 @@ -38,7 +38,7 @@ /* DO NOT EDIT! This file is generated by sdlgenaudiocvt.pl */ /* SDL - Simple DirectMedia Layer - Copyright (C) 1997-2009 Sam Lantinga + Copyright (C) 1997-2010 Sam Lantinga This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public @@ -400,15 +400,19 @@ register int eps = 0; EOF + my $endcomparison = '!='; + # Upsampling (growing the buffer) needs to work backwards, since we # overwrite the buffer as we go. if ($upsample) { + $endcomparison = '>'; # dst > target print <buf + dstsize)) - $channels; const $fctype *src = (($fctype *) (cvt->buf + cvt->len_cvt)) - $channels; const $fctype *target = ((const $fctype *) cvt->buf) - $channels; EOF } else { + $endcomparison = '<'; # dst < target print <buf; const $fctype *src = ($fctype *) cvt->buf; @@ -432,7 +436,7 @@ } print <