tNow fully functional ESD sound support; sound files can be configured via. con… | |
git clone git://src.adamsgaard.dk/vaccinewars | |
Log | |
Files | |
Refs | |
README | |
LICENSE | |
--- | |
commit 61b1f3b83f398db152a5a02110cd21da65b5297f | |
parent 743c5fd14806bc413585322d0608723306545335 | |
Author: Ben Webb <[email protected]> | |
Date: Sat, 4 May 2002 17:55:22 +0000 | |
Now fully functional ESD sound support; sound files can be configured via. | |
configuration files (Sound.Jet etc.) | |
Diffstat: | |
M src/sound.c | 24 ++++++++++++++++++++++++ | |
1 file changed, 24 insertions(+), 0 deletions(-) | |
--- | |
diff --git a/src/sound.c b/src/sound.c | |
t@@ -24,10 +24,34 @@ | |
#include <config.h> | |
#endif | |
+#include "sound_esd.h" | |
+ | |
+static SoundDriver *driver = NULL; | |
+ | |
void SoundInit(void) | |
{ | |
+#ifdef HAVE_ESD | |
+ driver = SoundInit_ESD(); | |
+#endif | |
+} | |
+ | |
+void SoundOpen(gchar *drivername) | |
+{ | |
+ if (driver && driver->open) { | |
+ driver->open(); | |
+ } | |
} | |
void SoundClose(void) | |
{ | |
+ if (driver && driver->close) { | |
+ driver->close(); | |
+ } | |
+} | |
+ | |
+void SoundPlay(const gchar *snd) | |
+{ | |
+ if (driver && driver->play && snd && snd[0]) { | |
+ driver->play(snd); | |
+ } | |
} |