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

Commit

Permalink
Updated Tru64 audio to support int32.
Browse files Browse the repository at this point in the history
  • Loading branch information
icculus committed Sep 1, 2006
1 parent 8c941da commit 5d5d61e
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/audio/mme/SDL_mmeaudio.c
Expand Up @@ -135,7 +135,7 @@ MME_OpenAudio(_THIS, SDL_AudioSpec * spec)
shm->wFmt.wf.wFormatTag = WAVE_FORMAT_PCM;

/* Determine the audio parameters from the AudioSpec */
switch (spec->format & 0xFF) {
switch (SDL_AUDIO_BITSIZE(spec->format)) {
case 8:
/* Unsigned 8 bit audio data */
spec->format = AUDIO_U8;
Expand All @@ -146,11 +146,17 @@ MME_OpenAudio(_THIS, SDL_AudioSpec * spec)
spec->format = AUDIO_S16;
shm->wFmt.wBitsPerSample = 16;
break;
case 32:
/* Signed 32 bit audio data */
spec->format = AUDIO_S32;
shm->wFmt.wBitsPerSample = 32;
break;
default:
SDL_SetError("Unsupported audio format");
return (-1);
}

/* !!! FIXME: Can this handle more than stereo? */
shm->wFmt.wf.nChannels = spec->channels;
shm->wFmt.wf.nSamplesPerSec = spec->freq;
shm->wFmt.wf.nBlockAlign =
Expand Down

0 comments on commit 5d5d61e

Please sign in to comment.