Fixed bug 3662 - Error message when using the audio conversion setup without an initialized audio subsystem is a bit vague
Simon Hug This issue actually raises the question if this API change (requirement of initialized audio subsystem) is breaking backwards compatibility. I don't see the documentation saying it is needed in 2.0.5.
This commit is contained in:
parent
70aacb0db9
commit
a86f7e738e
4 changed files with 13 additions and 16 deletions
|
@ -895,11 +895,6 @@ SDL_BuildAudioCVT(SDL_AudioCVT * cvt,
|
|||
return SDL_InvalidParamError("cvt");
|
||||
}
|
||||
|
||||
/* Conversions from and to float require the audio subsystem to be initialized */
|
||||
if (!SDL_WasInit(SDL_INIT_AUDIO)) {
|
||||
return SDL_SetError("Audio subsystem has not been initialized");
|
||||
}
|
||||
|
||||
/* Make sure we zero out the audio conversion before error checking */
|
||||
SDL_zerop(cvt);
|
||||
|
||||
|
@ -932,6 +927,9 @@ SDL_BuildAudioCVT(SDL_AudioCVT * cvt,
|
|||
cvt->len_ratio = 1.0;
|
||||
cvt->rate_incr = ((double) dst_rate) / ((double) src_rate);
|
||||
|
||||
/* Make sure we've chosen audio conversion functions (MMX, scalar, etc.) */
|
||||
SDL_ChooseAudioConverters();
|
||||
|
||||
/* SDL now favors float32 as its preferred internal format, and considers
|
||||
everything else to be a degenerate case that we might have to make
|
||||
multiple passes over the data to convert to and from float32 as
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue