mirror of
https://github.com/UberGames/lilium-voyager.git
synced 2025-01-19 14:10:49 +00:00
assume a default if sndspeed==0 to stay compatible with the original
code
This commit is contained in:
parent
f9c2c01eb5
commit
92216f0f07
1 changed files with 2 additions and 1 deletions
|
@ -136,7 +136,7 @@ qboolean SNDDMA_Init(void)
|
||||||
|
|
||||||
if (!snddevice) {
|
if (!snddevice) {
|
||||||
sndbits = Cvar_Get("sndbits", "16", CVAR_ARCHIVE);
|
sndbits = Cvar_Get("sndbits", "16", CVAR_ARCHIVE);
|
||||||
sndspeed = Cvar_Get("sndspeed", "22050", CVAR_ARCHIVE);
|
sndspeed = Cvar_Get("sndspeed", "0", CVAR_ARCHIVE);
|
||||||
sndchannels = Cvar_Get("sndchannels", "2", CVAR_ARCHIVE);
|
sndchannels = Cvar_Get("sndchannels", "2", CVAR_ARCHIVE);
|
||||||
snddevice = Cvar_Get("snddevice", "/dev/dsp", CVAR_ARCHIVE);
|
snddevice = Cvar_Get("snddevice", "/dev/dsp", CVAR_ARCHIVE);
|
||||||
}
|
}
|
||||||
|
@ -164,6 +164,7 @@ qboolean SNDDMA_Init(void)
|
||||||
tmp = 16;
|
tmp = 16;
|
||||||
|
|
||||||
desired.freq = (int) sndspeed->value;
|
desired.freq = (int) sndspeed->value;
|
||||||
|
if(!desired.freq) desired.freq = 22050;
|
||||||
desired.format = ((tmp == 16) ? AUDIO_S16SYS : AUDIO_U8);
|
desired.format = ((tmp == 16) ? AUDIO_S16SYS : AUDIO_U8);
|
||||||
|
|
||||||
// I dunno if this is the best idea, but I'll give it a try...
|
// I dunno if this is the best idea, but I'll give it a try...
|
||||||
|
|
Loading…
Reference in a new issue