wavestream.c
changeset 718 fb0562cc1559
parent 711 f40c5ac95b12
child 725 bdf7b8d20566
     1.1 --- a/wavestream.c	Tue Jan 12 05:56:16 2016 -0800
     1.2 +++ b/wavestream.c	Fri Jan 29 12:44:13 2016 -0800
     1.3 @@ -241,7 +241,7 @@
     1.4          }
     1.5          music->cvt.len = original_len;
     1.6          SDL_ConvertAudio(&music->cvt);
     1.7 -        SDL_MixAudio(stream, music->cvt.buf, music->cvt.len_cvt, wavestream_volume);
     1.8 +        SDL_MixAudioFormat(stream, music->cvt.buf, mixer.format,music->cvt.len_cvt, wavestream_volume);
     1.9          consumed = music->cvt.len_cvt;
    1.10      } else {
    1.11          Uint8 *data;
    1.12 @@ -251,7 +251,7 @@
    1.13          data = SDL_stack_alloc(Uint8, len);
    1.14          if (data) {
    1.15              len = SDL_RWread(music->src, data, 1, len);
    1.16 -            SDL_MixAudio(stream, data, len, wavestream_volume);
    1.17 +            SDL_MixAudioFormat(stream, data, mixer.format, len, wavestream_volume);
    1.18              SDL_stack_free(data);
    1.19          }
    1.20          consumed = len;