- // If we haven't obtained what we wanted
- if (wantspec.freq != obtainspec.freq ||
- wantspec.format != obtainspec.format ||
- wantspec.channels != obtainspec.channels)
- {
- SDL_CloseAudio();
-
- // Pass the obtained format as a suggested format
- if (suggested != NULL)
- {
- suggested->speed = obtainspec.freq;
- // FIXME: check the format more carefully. There are plenty of unsupported cases
- suggested->width = ((obtainspec.format == AUDIO_U8) ? 1 : 2);
- suggested->channels = obtainspec.channels;
- }
-
- return false;
- }