diff options
author | Simon Howard | 2008-09-11 21:03:48 +0000 |
---|---|---|
committer | Simon Howard | 2008-09-11 21:03:48 +0000 |
commit | b868352951acee0e556d702e5e90aa67d9a2b39e (patch) | |
tree | b07b281ae6be155d2b80fdc09c2daa3c3132d238 /src/i_sound.c | |
parent | d863f019a2d19f1146d92c4db71883ab2ead87ec (diff) | |
download | chocolate-doom-b868352951acee0e556d702e5e90aa67d9a2b39e.tar.gz chocolate-doom-b868352951acee0e556d702e5e90aa67d9a2b39e.tar.bz2 chocolate-doom-b868352951acee0e556d702e5e90aa67d9a2b39e.zip |
Refactor configuration file system to allow configuration file variables
to be bound in a distributed fashion around the program. Remove
dependency of m_config.c on doom/.
Subversion-branch: /branches/raven-branch
Subversion-revision: 1222
Diffstat (limited to 'src/i_sound.c')
-rw-r--r-- | src/i_sound.c | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/src/i_sound.c b/src/i_sound.c index c44219fb..3401d014 100644 --- a/src/i_sound.c +++ b/src/i_sound.c @@ -33,6 +33,7 @@ #include "i_sound.h" #include "i_video.h" #include "m_argv.h" +#include "m_config.h" // Disable music on OSX by default; there are problems with SDL_mixer. @@ -60,6 +61,15 @@ extern sound_module_t sound_sdl_module; extern sound_module_t sound_pcsound_module; extern music_module_t music_sdl_module; +// 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; + // Compiled-in sound modules: static sound_module_t *sound_modules[] = @@ -360,3 +370,17 @@ boolean I_MusicIsPlaying(void) } } +void I_BindSoundVariables(void) +{ + extern int use_libsamplerate; + + M_BindVariable("snd_musicdevice", &snd_musicdevice); + M_BindVariable("snd_sfxdevice", &snd_sfxdevice); + M_BindVariable("snd_sbport", &snd_sbport); + M_BindVariable("snd_sbirq", &snd_sbirq); + M_BindVariable("snd_sbdma", &snd_sbdma); + M_BindVariable("snd_mport", &snd_mport); + M_BindVariable("snd_samplerate", &snd_samplerate); + M_BindVariable("use_libsamplerate", &use_libsamplerate); +} + |