src/audio/sdlgenaudiocvt.pl
changeset 6194 ba275696ab7a
parent 6138 4c64952a58fb
child 6196 f1a312da2669
     1.1 --- a/src/audio/sdlgenaudiocvt.pl	Sun Jan 08 14:45:57 2012 -0500
     1.2 +++ b/src/audio/sdlgenaudiocvt.pl	Sun Jan 08 17:10:57 2012 -0500
     1.3 @@ -404,11 +404,11 @@
     1.4      # Upsampling (growing the buffer) needs to work backwards, since we
     1.5      #  overwrite the buffer as we go.
     1.6      if ($upsample) {
     1.7 -        $endcomparison = '>';  # dst > target
     1.8 +        $endcomparison = '>=';  # dst > target
     1.9          print <<EOF;
    1.10      $fctype *dst = (($fctype *) (cvt->buf + dstsize)) - $channels;
    1.11      const $fctype *src = (($fctype *) (cvt->buf + cvt->len_cvt)) - $channels;
    1.12 -    const $fctype *target = ((const $fctype *) cvt->buf) - $channels;
    1.13 +    const $fctype *target = ((const $fctype *) cvt->buf);
    1.14  EOF
    1.15      } else {
    1.16          $endcomparison = '<';  # dst < target
    1.17 @@ -544,11 +544,11 @@
    1.18      # Upsampling (growing the buffer) needs to work backwards, since we
    1.19      #  overwrite the buffer as we go.
    1.20      if ($upsample) {
    1.21 -        $endcomparison = '>';  # dst > target
    1.22 +        $endcomparison = '>=';  # dst > target
    1.23          print <<EOF;
    1.24      $fctype *dst = (($fctype *) (cvt->buf + dstsize)) - $channels;
    1.25      const $fctype *src = (($fctype *) (cvt->buf + cvt->len_cvt)) - $channels;
    1.26 -    const $fctype *target = ((const $fctype *) cvt->buf) - $channels;
    1.27 +    const $fctype *target = ((const $fctype *) cvt->buf);
    1.28  EOF
    1.29      } else {
    1.30          $endcomparison = '<';  # dst < target