From d1b4abc85ad6a53002c3a588ad2fa73f2d0c9b6d Mon Sep 17 00:00:00 2001 From: Rafael Kitover Date: Mon, 6 Mar 2017 04:26:33 -0800 Subject: [PATCH] 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. --- src/common/ConfigManager.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/common/ConfigManager.cpp b/src/common/ConfigManager.cpp index 0718a515..2cccd5cd 100644 --- a/src/common/ConfigManager.cpp +++ b/src/common/ConfigManager.cpp @@ -537,15 +537,15 @@ void LoadConfig() winGbBorderOn = ReadPref("borderOn", 0); winGbPrinterEnabled = ReadPref("gbPrinter", 0); - int soundQuality = (ReadPrefHex("soundQuality")); + int soundQuality = (ReadPrefHex("soundQuality", 1)); switch (soundQuality) { case 1: case 2: case 4: break; default: - log("Unknown sound quality %d. Defaulting to 22Khz\n", soundQuality); - soundQuality = 2; + log("Unknown sound quality %d. Defaulting to 44Khz\n", soundQuality); + soundQuality = 1; break; } soundSetSampleRate(44100 / soundQuality);