Mercurial > sdl-ios-xcode
comparison src/audio/dc/SDL_dcaudio.c @ 2043:adf732f1f016
Formatting update
author | Sam Lantinga <slouken@libsdl.org> |
---|---|
date | Sun, 24 Sep 2006 15:56:55 +0000 |
parents | 8c05b048c32c |
children | 5f6550e5184f c8b3d3d13ed1 |
comparison
equal
deleted
inserted
replaced
2042:3908e1f808e1 | 2043:adf732f1f016 |
---|---|
224 int valid_datatype = 0; | 224 int valid_datatype = 0; |
225 while ((!valid_datatype) && (test_format)) { | 225 while ((!valid_datatype) && (test_format)) { |
226 spec->format = test_format; | 226 spec->format = test_format; |
227 switch (test_format) { | 227 switch (test_format) { |
228 /* only formats Dreamcast accepts... */ | 228 /* only formats Dreamcast accepts... */ |
229 case AUDIO_S8: | 229 case AUDIO_S8: |
230 case AUDIO_S16LSB: | 230 case AUDIO_S16LSB: |
231 valid_datatype = 1; | 231 valid_datatype = 1; |
232 break; | 232 break; |
233 | 233 |
234 default: | 234 default: |
235 test_format = SDL_NextAudioFormat(); | 235 test_format = SDL_NextAudioFormat(); |
236 break; | 236 break; |
237 } | 237 } |
238 } | 238 } |
239 | 239 |
240 if (!valid_datatype) { /* shouldn't happen, but just in case... */ | 240 if (!valid_datatype) { /* shouldn't happen, but just in case... */ |
241 SDL_SetError("Unsupported audio format"); | 241 SDL_SetError("Unsupported audio format"); |
242 return (-1); | 242 return (-1); |
243 } | 243 } |
244 | 244 |
245 if (spec->channels > 2) | 245 if (spec->channels > 2) |
246 spec->channels = 2; /* no more than stereo on the Dreamcast. */ | 246 spec->channels = 2; /* no more than stereo on the Dreamcast. */ |
247 | 247 |
248 /* Update the fragment size as size in bytes */ | 248 /* Update the fragment size as size in bytes */ |
249 SDL_CalculateAudioSpec(spec); | 249 SDL_CalculateAudioSpec(spec); |
250 | 250 |
251 /* Allocate mixing buffer */ | 251 /* Allocate mixing buffer */ |