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:
Rafael Kitover 2017-03-06 04:26:33 -08:00
parent f2bfc549ea
commit d1b4abc85a
1 changed files with 3 additions and 3 deletions

View File

@ -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);