aboutsummaryrefslogtreecommitdiffstats
path: root/examples/alstream.c
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2017-04-07 03:33:03 -0700
committerChris Robinson <[email protected]>2017-04-07 03:33:03 -0700
commit710bbde09c45cf32e94e815f43ce48fd80c9d77b (patch)
tree51a1a16998c7b1b2deb037be7466097b8a0434ac /examples/alstream.c
parent70a097bf59741dca44069ef139a22d2b7e0a9a07 (diff)
Ensure SDL_AUDIO_BITSIZE is defined for older SDL2 versions
Diffstat (limited to 'examples/alstream.c')
-rw-r--r--examples/alstream.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/examples/alstream.c b/examples/alstream.c
index d13899d0..68115e8d 100644
--- a/examples/alstream.c
+++ b/examples/alstream.c
@@ -39,6 +39,13 @@
#include "common/alhelpers.h"
+#ifndef SDL_AUDIO_MASK_BITSIZE
+#define SDL_AUDIO_MASK_BITSIZE (0xFF)
+#endif
+#ifndef SDL_AUDIO_BITSIZE
+#define SDL_AUDIO_BITSIZE(x) (x & SDL_AUDIO_MASK_BITSIZE)
+#endif
+
/* Define the number of buffers and buffer size (in milliseconds) to use. 4
* buffers with 200ms each gives a nice per-chunk size, and lets the queue last
* for almost one second. */