src/audio/SDL_audiocvt.c
changeset 11406 f40c2dedaded
parent 11405 4e12f78c2b0e
child 11508 a8382e3d0b54
     1.1 --- a/src/audio/SDL_audiocvt.c	Tue Aug 29 00:41:45 2017 -0400
     1.2 +++ b/src/audio/SDL_audiocvt.c	Mon Aug 28 21:42:39 2017 -0700
     1.3 @@ -895,11 +895,6 @@
     1.4          return SDL_InvalidParamError("cvt");
     1.5      }
     1.6  
     1.7 -    /* Conversions from and to float require the audio subsystem to be initialized */
     1.8 -    if (!SDL_WasInit(SDL_INIT_AUDIO)) {
     1.9 -        return SDL_SetError("Audio subsystem has not been initialized");
    1.10 -    }
    1.11 -
    1.12      /* Make sure we zero out the audio conversion before error checking */
    1.13      SDL_zerop(cvt);
    1.14  
    1.15 @@ -932,6 +927,9 @@
    1.16      cvt->len_ratio = 1.0;
    1.17      cvt->rate_incr = ((double) dst_rate) / ((double) src_rate);
    1.18  
    1.19 +    /* Make sure we've chosen audio conversion functions (MMX, scalar, etc.) */
    1.20 +    SDL_ChooseAudioConverters();
    1.21 +
    1.22      /* SDL now favors float32 as its preferred internal format, and considers
    1.23         everything else to be a degenerate case that we might have to make
    1.24         multiple passes over the data to convert to and from float32 as