src/audio/SDL_audiocvt.c
changeset 11585 9b646e8f4622
parent 11583 c48ab2c208a2
child 11586 f882930f174f
     1.1 --- a/src/audio/SDL_audiocvt.c	Tue Oct 10 17:41:41 2017 -0700
     1.2 +++ b/src/audio/SDL_audiocvt.c	Tue Oct 10 22:18:46 2017 -0400
     1.3 @@ -722,16 +722,15 @@
     1.4      SDL_assert(format == AUDIO_F32SYS);
     1.5  
     1.6      /* we keep no streaming state here, so pad with silence on both ends. */
     1.7 -    padding = SDL_stack_alloc(float, paddingsamples);
     1.8 +    padding = (float *) SDL_calloc(paddingsamples, sizeof (float));
     1.9      if (!padding) {
    1.10          SDL_OutOfMemory();
    1.11          return;
    1.12      }
    1.13 -    SDL_memset(padding, '\0', paddingsamples * sizeof (float));
    1.14  
    1.15      cvt->len_cvt = SDL_ResampleAudio(chans, inrate, outrate, padding, padding, src, srclen, dst, dstlen);
    1.16  
    1.17 -    SDL_stack_free(padding);
    1.18 +    SDL_free(padding);
    1.19  
    1.20      SDL_memcpy(cvt->buf, dst, cvt->len_cvt);  /* !!! FIXME: remove this if we can get the resampler to work in-place again. */
    1.21