Mercurial > sdl-ios-xcode
comparison src/audio/mint/SDL_mintaudio_stfa.c @ 2043:adf732f1f016
Formatting update
author | Sam Lantinga <slouken@libsdl.org> |
---|---|
date | Sun, 24 Sep 2006 15:56:55 +0000 |
parents | d48ead2d2ba5 |
children | 5f6550e5184f b19680c84cdf |
comparison
equal
deleted
inserted
replaced
2042:3908e1f808e1 | 2043:adf732f1f016 |
---|---|
204 static int | 204 static int |
205 Mint_CheckAudio(_THIS, SDL_AudioSpec * spec) | 205 Mint_CheckAudio(_THIS, SDL_AudioSpec * spec) |
206 { | 206 { |
207 int i; | 207 int i; |
208 | 208 |
209 DEBUG_PRINT((DEBUG_NAME "asked: %d bits, ", SDL_AUDIO_BITSIZE(spec->format))); | 209 DEBUG_PRINT((DEBUG_NAME "asked: %d bits, ", |
210 SDL_AUDIO_BITSIZE(spec->format))); | |
210 DEBUG_PRINT(("float=%d, ", SDL_AUDIO_ISFLOAT(spec->format))); | 211 DEBUG_PRINT(("float=%d, ", SDL_AUDIO_ISFLOAT(spec->format))); |
211 DEBUG_PRINT(("signed=%d, ", SDL_AUDIO_ISSIGNED(spec->format))); | 212 DEBUG_PRINT(("signed=%d, ", SDL_AUDIO_ISSIGNED(spec->format))); |
212 DEBUG_PRINT(("big endian=%d, ", SDL_AUDIO_ISBIGENDIAN(spec->format))); | 213 DEBUG_PRINT(("big endian=%d, ", SDL_AUDIO_ISBIGENDIAN(spec->format))); |
213 DEBUG_PRINT(("channels=%d, ", spec->channels)); | 214 DEBUG_PRINT(("channels=%d, ", spec->channels)); |
214 DEBUG_PRINT(("freq=%d\n", spec->freq)); | 215 DEBUG_PRINT(("freq=%d\n", spec->freq)); |
215 | 216 |
216 if (SDL_AUDIO_BITSIZE(spec->format) > 16) { | 217 if (SDL_AUDIO_BITSIZE(spec->format) > 16) { |
217 spec->format = AUDIO_S16SYS; /* clamp out int32/float32 ... */ | 218 spec->format = AUDIO_S16SYS; /* clamp out int32/float32 ... */ |
218 } | 219 } |
219 | 220 |
220 if (spec->channels > 2) { | 221 if (spec->channels > 2) { |
221 spec->channels = 2; /* no more than stereo! */ | 222 spec->channels = 2; /* no more than stereo! */ |
222 } | 223 } |
223 | 224 |
224 /* Check formats available */ | 225 /* Check formats available */ |
225 MINTAUDIO_freqcount = 0; | 226 MINTAUDIO_freqcount = 0; |
226 for (i = 0; i < 16; i++) { | 227 for (i = 0; i < 16; i++) { |
237 #endif | 238 #endif |
238 | 239 |
239 MINTAUDIO_numfreq = SDL_MintAudio_SearchFrequency(this, spec->freq); | 240 MINTAUDIO_numfreq = SDL_MintAudio_SearchFrequency(this, spec->freq); |
240 spec->freq = MINTAUDIO_frequencies[MINTAUDIO_numfreq].frequency; | 241 spec->freq = MINTAUDIO_frequencies[MINTAUDIO_numfreq].frequency; |
241 | 242 |
242 DEBUG_PRINT((DEBUG_NAME "obtained: %d bits, ", SDL_AUDIO_BITSIZE(spec->format))); | 243 DEBUG_PRINT((DEBUG_NAME "obtained: %d bits, ", |
244 SDL_AUDIO_BITSIZE(spec->format))); | |
243 DEBUG_PRINT(("float=%d, ", SDL_AUDIO_ISFLOAT(spec->format))); | 245 DEBUG_PRINT(("float=%d, ", SDL_AUDIO_ISFLOAT(spec->format))); |
244 DEBUG_PRINT(("signed=%d, ", SDL_AUDIO_ISSIGNED(spec->format))); | 246 DEBUG_PRINT(("signed=%d, ", SDL_AUDIO_ISSIGNED(spec->format))); |
245 DEBUG_PRINT(("big endian=%d, ", SDL_AUDIO_ISBIGENDIAN(spec->format))); | 247 DEBUG_PRINT(("big endian=%d, ", SDL_AUDIO_ISBIGENDIAN(spec->format))); |
246 DEBUG_PRINT(("channels=%d, ", spec->channels)); | 248 DEBUG_PRINT(("channels=%d, ", spec->channels)); |
247 DEBUG_PRINT(("freq=%d\n", spec->freq)); | 249 DEBUG_PRINT(("freq=%d\n", spec->freq)); |