aboutsummaryrefslogtreecommitdiff
path: root/audio/sdlaudio.c
diff options
context:
space:
mode:
Diffstat (limited to 'audio/sdlaudio.c')
-rw-r--r--audio/sdlaudio.c28
1 files changed, 28 insertions, 0 deletions
diff --git a/audio/sdlaudio.c b/audio/sdlaudio.c
index c00e7d7845..21b7a0484b 100644
--- a/audio/sdlaudio.c
+++ b/audio/sdlaudio.c
@@ -77,6 +77,14 @@ static int aud_to_sdlfmt (AudioFormat fmt)
case AUDIO_FORMAT_U16:
return AUDIO_U16LSB;
+ case AUDIO_FORMAT_S32:
+ return AUDIO_S32LSB;
+
+ /* no unsigned 32-bit support in SDL */
+
+ case AUDIO_FORMAT_F32:
+ return AUDIO_F32LSB;
+
default:
dolog ("Internal logic error: Bad audio format %d\n", fmt);
#ifdef DEBUG_AUDIO
@@ -119,6 +127,26 @@ static int sdl_to_audfmt(int sdlfmt, AudioFormat *fmt, int *endianness)
*fmt = AUDIO_FORMAT_U16;
break;
+ case AUDIO_S32LSB:
+ *endianness = 0;
+ *fmt = AUDIO_FORMAT_S32;
+ break;
+
+ case AUDIO_S32MSB:
+ *endianness = 1;
+ *fmt = AUDIO_FORMAT_S32;
+ break;
+
+ case AUDIO_F32LSB:
+ *endianness = 0;
+ *fmt = AUDIO_FORMAT_F32;
+ break;
+
+ case AUDIO_F32MSB:
+ *endianness = 1;
+ *fmt = AUDIO_FORMAT_F32;
+ break;
+
default:
dolog ("Unrecognized SDL audio format %d\n", sdlfmt);
return -1;