Patched to compile on some compilers.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43
diff --git a/src/audio/SDL_audio_c.h b/src/audio/SDL_audio_c.h
index 5d1d554..767fb8d 100644
--- a/src/audio/SDL_audio_c.h
+++ b/src/audio/SDL_audio_c.h
@@ -18,6 +18,10 @@
misrepresented as being the original software.
3. This notice may not be removed or altered from any source distribution.
*/
+
+#ifndef SDL_audio_c_h_
+#define SDL_audio_c_h_
+
#include "../SDL_internal.h"
#ifndef DEBUG_CONVERT
@@ -94,4 +98,6 @@ int SDL_AudioStreamAvailable(SDL_AudioStream *stream);
/* dispose of a stream */
void SDL_FreeAudioStream(SDL_AudioStream *stream);
+#endif
+
/* vi: set ts=4 sw=4 expandtab: */
diff --git a/src/audio/SDL_sysaudio.h b/src/audio/SDL_sysaudio.h
index bad2950..e62aecf 100644
--- a/src/audio/SDL_sysaudio.h
+++ b/src/audio/SDL_sysaudio.h
@@ -26,6 +26,7 @@
#include "SDL_mutex.h"
#include "SDL_thread.h"
#include "../SDL_dataqueue.h"
+#include "./SDL_audio_c.h"
/* !!! FIXME: These are wordy and unlocalized... */
#define DEFAULT_OUTPUT_DEVNAME "System audio output device"
@@ -35,8 +36,6 @@
typedef struct SDL_AudioDevice SDL_AudioDevice;
#define _THIS SDL_AudioDevice *_this
-typedef struct SDL_AudioStream SDL_AudioStream;
-
/* Audio targets should call this as devices are added to the system (such as
a USB headset being plugged in), and should also be called for
for every device found during DetectDevices(). */