sdl/audio: Add stub functions for older SDL2
@@ -24,6 +24,54 @@ static int SDL_DequeueAudio(SDL_AudioDeviceID dev, const void *data, Uint32 len)
{
return -1;
}
+#endif
+
+#if !(SDL_VERSION_ATLEAST(2,0,7))
+
+struct _SDL_AudioStream;
+typedef struct _SDL_AudioStream SDL_AudioStream;
+
+#pragma message("SDL_NewAudioStream is not supported before SDL 2.0.7")
+static SDL_AudioStream * SDL_NewAudioStream(const SDL_AudioFormat src_format, const Uint8 src_channels, const int src_rate, const SDL_AudioFormat dst_format, const Uint8 dst_channels, const int dst_rate)
+{
+ return 0;
+}
+
+#pragma message("SDL_AudioStreamPut is not supported before SDL 2.0.7")
+static int SDL_AudioStreamPut(SDL_AudioStream *stream, const void *buf, int len)
+{
+ return -1;
+}
+
+#pragma message("SDL_AudioStreamGet is not supported before SDL 2.0.7")
+static int SDL_AudioStreamGet(SDL_AudioStream *stream, void *buf, int len)
+{
+ return -1;
+}
+
+#pragma message("SDL_AudioStreamAvailable is not supported before SDL 2.0.7")
+static int SDL_AudioStreamAvailable(SDL_AudioStream *stream)
+{
+ return -1;
+}
+
+#pragma message("SDL_AudioStreamFlush is not supported before SDL 2.0.7")
+static int SDL_AudioStreamFlush(SDL_AudioStream *stream)
+{
+ return -1;
+}
+
+#pragma message("SDL_AudioStreamClear is not supported before SDL 2.0.7")
+static int SDL_AudioStreamClear(SDL_AudioStream *stream)
+{
+ return -1;
+}
+
+#pragma message("SDL_FreeAudioStream is not supported before SDL 2.0.7")
+static void SDL_FreeAudioStream(SDL_AudioStream *stream)
+{
+}
+
#endif
*/
import "C"
