From 6bbc5328fc375fea5c3cf18dbc10bb4071f6f906 Mon Sep 17 00:00:00 2001 From: jacksonmj Date: Tue, 8 Feb 2011 14:30:02 +0000 Subject: [PATCH] Sound device not compulsory --- includes/defines.h | 2 +- src/main.c | 13 ++++++++++--- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/includes/defines.h b/includes/defines.h index 967e3f133..f4a2a4dfa 100644 --- a/includes/defines.h +++ b/includes/defines.h @@ -99,7 +99,7 @@ int GRAV_G2; int GRAV_B2; extern int legacy_enable; - +extern int sound_enable; extern int kiosk_enable; extern int sys_pause; diff --git a/src/main.c b/src/main.c index 0c4aa5f09..938a949dc 100644 --- a/src/main.c +++ b/src/main.c @@ -82,6 +82,8 @@ void play_sound(char *file) Uint32 dlen; SDL_AudioCVT cvt; + if (!sound_enable) return; + /* Look for an empty (or finished) sound slot */ for ( index=0; index