Skip to content
This repository has been archived by the owner on Feb 11, 2021. It is now read-only.

Commit

Permalink
Mac OS 9 support for int32/float32.
Browse files Browse the repository at this point in the history
  • Loading branch information
icculus committed Sep 1, 2006
1 parent 2c8e894 commit c79ee3a
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion src/audio/macrom/SDL_romaudio.c
Expand Up @@ -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);

Expand All @@ -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 */
Expand Down

0 comments on commit c79ee3a

Please sign in to comment.