genode/libports/src/lib/sdl/SDL_audio.patch
Christian Prochaska ac628b106b SDL audio support
This patch implements a Genode-specific audio backend for SDL.

The audio volume (in percent) can be configured in the config file of the
SDL application:

<config>
	<sdl_audio_volume value="100"/>
</config>

Fixes #204.
2012-05-10 19:07:54 +02:00

27 lines
706 B
Diff

diff --git a/src/audio/SDL_audio.c b/src/audio/SDL_audio.c
--- a/src/audio/SDL_audio.c
+++ b/src/audio/SDL_audio.c
@@ -113,6 +113,9 @@
#if SDL_AUDIO_DRIVER_EPOCAUDIO
&EPOCAudio_bootstrap,
#endif
+#if SDL_AUDIO_DRIVER_GENODE
+ &GENODEAUD_bootstrap,
+#endif
NULL
};
SDL_AudioDevice *current_audio = NULL;
diff --git a/src/audio/SDL_sysaudio.h b/src/audio/SDL_sysaudio.h
--- a/src/audio/SDL_sysaudio.h
+++ b/src/audio/SDL_sysaudio.h
@@ -177,6 +177,9 @@
#if SDL_AUDIO_DRIVER_EPOCAUDIO
extern AudioBootStrap EPOCAudio_bootstrap;
#endif
+#if SDL_AUDIO_DRIVER_GENODE
+extern AudioBootStrap GENODEAUD_bootstrap;
+#endif
/* This is the current audio device */
extern SDL_AudioDevice *current_audio;