Quellcode durchsuchen

Removed assertions from inner ResampleAudio loop

Brick vor 1 Jahr
Ursprung
Commit
14e38b17d6
1 geänderte Dateien mit 0 neuen und 2 gelöschten Zeilen
  1. 0 2
      src/audio/SDL_audiocvt.c

+ 0 - 2
src/audio/SDL_audiocvt.c

@@ -100,7 +100,6 @@ static void ResampleAudio(const int chans, const float *lpadding, const float *r
             for (j = 0; j < RESAMPLER_ZERO_CROSSINGS; j++) {
                 const int filt_ind = j + filterindex1;
                 const int srcframe = srcindex - j;
-                SDL_assert(paddinglen + srcframe >= 0);
                 /* !!! FIXME: we can bubble this conditional out of here by doing a pre loop. */
                 const float insample = (srcframe < 0) ? lpadding[((paddinglen + srcframe) * chans) + chan] : inbuf[(srcframe * chans) + chan];
                 outsample += (float) (insample * (ResamplerFilter[filt_ind] + (interpolation1 * ResamplerFilterDifference[filt_ind])));
@@ -110,7 +109,6 @@ static void ResampleAudio(const int chans, const float *lpadding, const float *r
             for (j = 0; j < RESAMPLER_ZERO_CROSSINGS; j++) {
                 const int filt_ind = j + filterindex2;
                 const int srcframe = srcindex + 1 + j;
-                SDL_assert(srcframe - inframes < paddinglen);
                 // !!! FIXME: we can bubble this conditional out of here by doing a post loop.
                 const float insample = (srcframe >= inframes) ? rpadding[((srcframe - inframes) * chans) + chan] : inbuf[(srcframe * chans) + chan];
                 outsample += (float) (insample * (ResamplerFilter[filt_ind] + (interpolation2 * ResamplerFilterDifference[filt_ind])));