macosx: change default value for SoundInputRate and macSoundBuffer_ms, and apply the new value when running 1.59 for the first time

This commit is contained in:
tmkk 2019-02-23 14:52:11 +09:00
parent 9b26555183
commit 064085b41c
2 changed files with 15 additions and 2 deletions

View File

@ -126,7 +126,7 @@ long drawingMethod = kDrawingOpenGL;
int videoMode = VIDEOMODE_SMOOTH;
SInt32 macSoundVolume = 80; // %
uint32 macSoundBuffer_ms = 100; // ms
uint32 macSoundBuffer_ms = 80; // ms
uint32 macSoundInterval_ms = 16; // ms
bool8 macSoundLagEnable = false;
uint16 aueffect = 0;
@ -3032,7 +3032,7 @@ static void Initialize (void)
Settings.SixteenBitSound = true;
Settings.Stereo = true;
Settings.SoundPlaybackRate = 32000;
Settings.SoundInputRate = 32000;
Settings.SoundInputRate = 31950;
Settings.SupportHiRes = true;
Settings.Transparency = true;
Settings.AutoDisplayMessages = true;

View File

@ -258,6 +258,12 @@ void SavePrefs (void)
CFRelease(mref);
}
sref = (CFStringRef) CFDictionaryGetValue(CFBundleGetInfoDictionary(CFBundleGetMainBundle()), CFSTR("CFBundleShortVersionString"));
if (sref)
{
CFPreferencesSetAppValue(CFSTR("LastVersionUsed"), sref, kCFPreferencesCurrentApplication);
}
CFPreferencesAppSynchronize(kCFPreferencesCurrentApplication);
}
@ -301,6 +307,13 @@ void LoadPrefs (void)
CFRelease(mref);
}
sref = (CFStringRef) CFPreferencesCopyAppValue(CFSTR("LastVersionUsed"), kCFPreferencesCurrentApplication);
if (!sref) {
Settings.SoundInputRate = 31950;
macSoundBuffer_ms = 80;
}
else CFRelease(sref);
}
void ConfigurePreferences (void)