Mercurial > sdl-ios-xcode
comparison src/audio/mint/SDL_mintaudio_xbios.c @ 3851:405a192b68e7 SDL-1.2
Backport from 1.3: most of the audio drivers can now handle data
conversion at a higher level when they can't open the hardware in the
exact format requested.
author | Ryan C. Gordon <icculus@icculus.org> |
---|---|
date | Fri, 01 Sep 2006 22:50:24 +0000 |
parents | a8181c4040b8 |
children | 492ff98822fd |
comparison
equal
deleted
inserted
replaced
3850:28db418c7573 | 3851:405a192b68e7 |
---|---|
339 DEBUG_PRINT(("signed=%d, ", ((spec->format & 0x8000)!=0))); | 339 DEBUG_PRINT(("signed=%d, ", ((spec->format & 0x8000)!=0))); |
340 DEBUG_PRINT(("big endian=%d, ", ((spec->format & 0x1000)!=0))); | 340 DEBUG_PRINT(("big endian=%d, ", ((spec->format & 0x1000)!=0))); |
341 DEBUG_PRINT(("channels=%d, ", spec->channels)); | 341 DEBUG_PRINT(("channels=%d, ", spec->channels)); |
342 DEBUG_PRINT(("freq=%d\n", spec->freq)); | 342 DEBUG_PRINT(("freq=%d\n", spec->freq)); |
343 | 343 |
344 if (spec->channels > 2) { | |
345 spec->channels = 2; /* no more than stereo! */ | |
346 } | |
347 | |
344 spec->format |= 0x8000; /* Audio is always signed */ | 348 spec->format |= 0x8000; /* Audio is always signed */ |
345 if ((spec->format & 0x00ff)==16) { | 349 if ((spec->format & 0x00ff)==16) { |
346 spec->format |= 0x1000; /* Audio is always big endian */ | 350 spec->format |= 0x1000; /* Audio is always big endian */ |
347 spec->channels=2; /* 16 bits always stereo */ | 351 spec->channels=2; /* 16 bits always stereo */ |
348 } | 352 } |