Browse Source

audio: Turns out the accumulation errors sound better. :/

Moving to double fixed the overflows, but using "time = i * incr" instead of
"time += incr" causes clicks in the output.
Ryan C. Gordon 7 years ago
parent
commit
5e5f2290f2
1 changed files with 1 additions and 1 deletions
  1. 1 1
      src/audio/SDL_audiocvt.c

+ 1 - 1
src/audio/SDL_audiocvt.c

@@ -527,7 +527,7 @@ SDL_ResampleAudio(const int chans, const int inrate, const int outrate,
             *(dst++) = outsample;
         }
 
-        outtime = i * outtimeincr;
+        outtime += outtimeincr;
     }
 
     return outframes * chans * sizeof (float);