Commit 75efbfe5 authored by Ryan C. Gordon's avatar Ryan C. Gordon

Minor cleanup in the mint driver that was sitting on my laptop (sorry!).

--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%402121
parent 4ecb44b1
...@@ -227,45 +227,44 @@ Mint_CheckAudio(_THIS, SDL_AudioSpec * spec) ...@@ -227,45 +227,44 @@ Mint_CheckAudio(_THIS, SDL_AudioSpec * spec)
} }
while ((!valid_datatype) && (test_format)) { while ((!valid_datatype) && (test_format)) {
/* Check formats available */
snd_format = Sndstatus(SND_QUERYFORMATS);
spec->format = test_format; spec->format = test_format;
resolution = SDL_AUDIO_BITSIZE(spec->format);
format_signed = SDL_AUDIO_ISSIGNED(spec->format);
format_bigendian = SDL_AUDIO_ISBIGENDIAN(spec->format);
switch (test_format) { switch (test_format) {
case AUDIO_U8: case AUDIO_U8:
case AUDIO_S8: case AUDIO_S8:
case AUDIO_U16LSB:
case AUDIO_S16LSB:
case AUDIO_U16MSB:
case AUDIO_S16MSB:
case AUDIO_S32LSB:
case AUDIO_S32MSB:
/* no float support... */
resolution = SDL_AUDIO_BITSIZE(spec->format);
format_signed = SDL_AUDIO_ISSIGNED(spec->format);
format_bigendian = SDL_AUDIO_ISBIGENDIAN(spec->format);
/* Check formats available */
snd_format = Sndstatus(SND_QUERYFORMATS);
switch (resolution) {
case 8:
if (snd_format & SND_FORMAT8) { if (snd_format & SND_FORMAT8) {
valid_datatype = 1; valid_datatype = 1;
snd_format = Sndstatus(SND_QUERY8BIT); snd_format = Sndstatus(SND_QUERY8BIT);
} }
break; break;
case 16:
case AUDIO_U16LSB:
case AUDIO_S16LSB:
case AUDIO_U16MSB:
case AUDIO_S16MSB:
if (snd_format & SND_FORMAT16) { if (snd_format & SND_FORMAT16) {
valid_datatype = 1; valid_datatype = 1;
snd_format = Sndstatus(SND_QUERY16BIT); snd_format = Sndstatus(SND_QUERY16BIT);
} }
break; break;
case 32:
case AUDIO_S32LSB:
case AUDIO_S32MSB:
if (snd_format & SND_FORMAT32) { if (snd_format & SND_FORMAT32) {
valid_datatype = 1; valid_datatype = 1;
snd_format = Sndstatus(SND_QUERY32BIT); snd_format = Sndstatus(SND_QUERY32BIT);
} }
break; break;
}
break; /* no float support... */
default:
test_format = SDL_NextAudioFormat();
break;
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment