Mac OS 9 support for int32/float32.
--HG-- extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%402051
This commit is contained in:
parent
28f57c5b3a
commit
43bec8da2b
1 changed files with 13 additions and 1 deletions
|
@ -238,6 +238,9 @@ Mac_OpenAudio(_THIS, SDL_AudioSpec * spec)
|
|||
case AUDIO_U16MSB:
|
||||
spec->format = AUDIO_S16MSB;
|
||||
break;
|
||||
case AUDIO_F32LSB:
|
||||
spec->format = AUDIO_F32MSB;
|
||||
break;
|
||||
}
|
||||
SDL_CalculateAudioSpec(spec);
|
||||
|
||||
|
@ -259,9 +262,18 @@ Mac_OpenAudio(_THIS, SDL_AudioSpec * spec)
|
|||
header.encode = cmpSH;
|
||||
|
||||
/* Note that we install the 16bitLittleEndian Converter if needed. */
|
||||
if (spec->format == 0x8010) {
|
||||
if (spec->format == AUDIO_S16LSB) {
|
||||
header.compressionID = fixedCompression;
|
||||
header.format = k16BitLittleEndianFormat;
|
||||
} else if (spec->format == AUDIO_S32MSB) {
|
||||
header.compressionID = fixedCompression;
|
||||
header.format = k32BitFormat;
|
||||
} else if (spec->format == AUDIO_S32LSB) {
|
||||
header.compressionID = fixedCompression;
|
||||
header.format = k32BitLittleEndianFormat;
|
||||
} else if (spec->format == AUDIO_F32MSB) {
|
||||
header.compressionID = fixedCompression;
|
||||
header.format = kFloat32Format;
|
||||
}
|
||||
|
||||
/* allocate 2 buffers */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue