summaryrefslogtreecommitdiff
path: root/src/setup/sound.c
diff options
context:
space:
mode:
authorSimon Howard2008-11-26 21:09:12 +0000
committerSimon Howard2008-11-26 21:09:12 +0000
commit2b5de0bafc1ebe347e08617de7595c1ea507c0b9 (patch)
treed822c7e164353d49e7de1018e9a2219487488cf4 /src/setup/sound.c
parent2f67325278637a349bb86fa6fc388e527a75a5c9 (diff)
downloadchocolate-doom-2b5de0bafc1ebe347e08617de7595c1ea507c0b9.tar.gz
chocolate-doom-2b5de0bafc1ebe347e08617de7595c1ea507c0b9.tar.bz2
chocolate-doom-2b5de0bafc1ebe347e08617de7595c1ea507c0b9.zip
Add bindings for remaining missing config file variables, to get
chocolate-setup functional again. Subversion-branch: /branches/raven-branch Subversion-revision: 1388
Diffstat (limited to 'src/setup/sound.c')
-rw-r--r--src/setup/sound.c40
1 files changed, 33 insertions, 7 deletions
diff --git a/src/setup/sound.c b/src/setup/sound.c
index 72414c83..91b6804a 100644
--- a/src/setup/sound.c
+++ b/src/setup/sound.c
@@ -24,6 +24,7 @@
#include <stdlib.h>
#include "textscreen.h"
+#include "m_config.h"
#include "sound.h"
@@ -65,20 +66,29 @@ static char *sfxmode_strings[] =
#define DEFAULT_MUSIC_DEVICE SNDDEVICE_SB
#endif
-int snd_sfxdevice = SNDDEVICE_SB;
-int numChannels = 8;
-int sfxVolume = 15;
+static int snd_sfxdevice = SNDDEVICE_SB;
+static int numChannels = 8;
+static int sfxVolume = 15;
-int snd_musicdevice = DEFAULT_MUSIC_DEVICE;
-int musicVolume = 15;
+static int snd_musicdevice = DEFAULT_MUSIC_DEVICE;
+static int musicVolume = 15;
-int snd_samplerate = 22050;
+static int snd_samplerate = 22050;
-int use_libsamplerate = 0;
+static int use_libsamplerate = 0;
static int snd_sfxmode;
static int snd_musicenabled;
+// DOS specific options: these are unused but should be maintained
+// so that the config file can be shared between chocolate
+// doom and doom.exe
+
+static int snd_sbport = 0;
+static int snd_sbirq = 0;
+static int snd_sbdma = 0;
+static int snd_mport = 0;
+
static void UpdateSndDevices(TXT_UNCAST_ARG(widget), TXT_UNCAST_ARG(data))
{
switch (snd_sfxmode)
@@ -165,3 +175,19 @@ void ConfigSound(void)
}
+void BindSoundVariables(void)
+{
+ M_BindVariable("snd_sfxdevice", &snd_sfxdevice);
+ M_BindVariable("snd_musicdevice", &snd_musicdevice);
+ M_BindVariable("snd_channels", &numChannels);
+ M_BindVariable("sfx_volume", &sfxVolume);
+ M_BindVariable("music_volume", &musicVolume);
+ M_BindVariable("snd_samplerate", &snd_samplerate);
+ M_BindVariable("use_libsamplerate", &use_libsamplerate);
+
+ M_BindVariable("snd_sbport", &snd_sbport);
+ M_BindVariable("snd_sbirq", &snd_sbirq);
+ M_BindVariable("snd_sbdma", &snd_sbdma);
+ M_BindVariable("snd_mport", &snd_mport);
+}
+