diff options
author | Simon Howard | 2007-06-14 21:45:50 +0000 |
---|---|---|
committer | Simon Howard | 2007-06-14 21:45:50 +0000 |
commit | 0480c925192df4f60416f3676ff4a295e2bc9e27 (patch) | |
tree | 85e0b6a6834ade2bcf6a1d367831860eb718516e /src/i_sound.c | |
parent | 5aa5e1fed5f7245a942bbfee43935d58a990deb5 (diff) | |
download | chocolate-doom-0480c925192df4f60416f3676ff4a295e2bc9e27.tar.gz chocolate-doom-0480c925192df4f60416f3676ff4a295e2bc9e27.tar.bz2 chocolate-doom-0480c925192df4f60416f3676ff4a295e2bc9e27.zip |
Add configuration file variable to change the sound sample rate
(snd_samplerate)
Subversion-branch: /trunk/chocolate-doom
Subversion-revision: 906
Diffstat (limited to 'src/i_sound.c')
-rw-r--r-- | src/i_sound.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/i_sound.c b/src/i_sound.c index a6e5995f..0eb64980 100644 --- a/src/i_sound.c +++ b/src/i_sound.c @@ -67,6 +67,8 @@ static int mixer_freq; static Uint16 mixer_format; static int mixer_channels; +int snd_samplerate = MIX_DEFAULT_FREQUENCY; + // When a sound stops, check if it is still playing. If it is not, // we can mark the sound data as CACHE to be freed back for other // means. @@ -570,7 +572,7 @@ I_InitSound() return; } - if (Mix_OpenAudio(22050, AUDIO_S16SYS, 2, 1024) < 0) + if (Mix_OpenAudio(snd_samplerate, AUDIO_S16SYS, 2, 1024) < 0) { fprintf(stderr, "Error initialising SDL_mixer: %s\n", Mix_GetError()); return; |