1
0
mirror of https://github.com/cookiengineer/audacity synced 2026-02-09 13:12:17 +01:00

Apparently, wxConfigBase::Write() does not update values for next access on all platforms unless Flush() method is called. Added many calls to wxConfigBase::Flush() to make sure the Rad() calls get the right values.

This commit is contained in:
v.audacity
2012-08-02 06:03:19 +00:00
parent e92d30b6e8
commit ebb4f530bb
57 changed files with 139 additions and 46 deletions

View File

@@ -185,8 +185,11 @@ bool RecordingPrefs::Apply()
double targetpeak, deltapeak;
gPrefs->Read(wxT("/AudioIO/TargetPeak"), &targetpeak);
gPrefs->Read(wxT("/AudioIO/DeltaPeakVolume"), &deltapeak);
if (targetpeak + deltapeak > 100.0 || targetpeak - deltapeak < 0.0)
if (targetpeak + deltapeak > 100.0 || targetpeak - deltapeak < 0.0)
{
gPrefs->Write(wxT("/AudioIO/DeltaPeakVolume"), min(100.0 - targetpeak, targetpeak));
gPrefs->Flush();
}
int value;
gPrefs->Read(wxT("/AudioIO/AnalysisTime"), &value);
@@ -197,7 +200,7 @@ bool RecordingPrefs::Apply()
if (value < 0)
gPrefs->Write(wxT("/AudioIO/NumberAnalysis"), AILA_DEF_NUMBER_ANALYSIS);
#endif
return true;
return gPrefs->Flush();
}