aboutsummaryrefslogtreecommitdiff
path: root/src/audio.c
diff options
context:
space:
mode:
authortaw27 <taw27@84d2e878-0bd5-11dd-ad15-13eda11d74c5>2008-07-05 16:00:40 +0000
committertaw27 <taw27@84d2e878-0bd5-11dd-ad15-13eda11d74c5>2008-07-05 16:00:40 +0000
commitffa1f448097091bf185d66d18188fdc5e9923566 (patch)
tree18b83556c4668012af1cfa5f0a18375b779c42a3 /src/audio.c
parent7e60489479958946be4f34c9fb8bb257dcc703b4 (diff)
Option to disable music
Neater handling of game options git-svn-id: svn://cook.msm.cam.ac.uk:745/thrust3d/thrust3d@130 84d2e878-0bd5-11dd-ad15-13eda11d74c5
Diffstat (limited to 'src/audio.c')
-rw-r--r--src/audio.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/audio.c b/src/audio.c
index 36c051a..f42a13a 100644
--- a/src/audio.c
+++ b/src/audio.c
@@ -349,7 +349,7 @@ done: /* Success */
}
/* SDL audio initial setup */
-AudioContext *audio_setup(int debug) {
+AudioContext *audio_setup(int debug, int no_music) {
AudioContext *a;
SDL_AudioSpec fmt;
@@ -387,7 +387,12 @@ AudioContext *audio_setup(int debug) {
return NULL;
}
- audio_play(a, "kraftwerk", 0.5, 1);
+ if ( !no_music ) {
+ audio_play(a, "kraftwerk", 0.5, 1);
+ } else {
+ if ( a->debug ) printf("AU: Music disabled.\n");
+ }
+
audio_play(a, "moan", 0.2, 1);
return a;