fix sound in SDL port/ConfigManager
Since we are using sound frequency to control game speed, not quality, change ConfigManager to default to a frequency of 44100 instead of 22050. This also fixes trace.log files showing up with "unknown sound quality" warnings.
This commit is contained in:
parent
f2bfc549ea
commit
d1b4abc85a
|
@ -537,15 +537,15 @@ void LoadConfig()
|
||||||
winGbBorderOn = ReadPref("borderOn", 0);
|
winGbBorderOn = ReadPref("borderOn", 0);
|
||||||
winGbPrinterEnabled = ReadPref("gbPrinter", 0);
|
winGbPrinterEnabled = ReadPref("gbPrinter", 0);
|
||||||
|
|
||||||
int soundQuality = (ReadPrefHex("soundQuality"));
|
int soundQuality = (ReadPrefHex("soundQuality", 1));
|
||||||
switch (soundQuality) {
|
switch (soundQuality) {
|
||||||
case 1:
|
case 1:
|
||||||
case 2:
|
case 2:
|
||||||
case 4:
|
case 4:
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
log("Unknown sound quality %d. Defaulting to 22Khz\n", soundQuality);
|
log("Unknown sound quality %d. Defaulting to 44Khz\n", soundQuality);
|
||||||
soundQuality = 2;
|
soundQuality = 1;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
soundSetSampleRate(44100 / soundQuality);
|
soundSetSampleRate(44100 / soundQuality);
|
||||||
|
|
Loading…
Reference in New Issue