1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-11-23 17:30:17 +01:00

Use Settings for default sample rate and format...

... The first is an example of a Setting with a computed default value.

Also making a new file to hold them, separate from the GUI that changes them
in QualityPrefs; fewer things depend on QualityPrefs
This commit is contained in:
Paul Licameli
2021-05-15 14:39:26 -04:00
parent 8c04ed3990
commit f1de843246
13 changed files with 107 additions and 65 deletions

View File

@@ -60,6 +60,7 @@ with changes in the SelectionBar.
#include "../ProjectSettings.h"
#include "../Snap.h"
#include "../ViewInfo.h"
#include "../prefs/QualitySettings.h"
#include "../AllThemeResources.h"
#if wxUSE_ACCESSIBILITY
@@ -123,8 +124,7 @@ SelectionBar::SelectionBar( AudacityProject &project )
// Refer to bug #462 for a scenario where the division-by-zero causes
// Audacity to fail.
// We expect mRate to be set from the project later.
mRate = (double) gPrefs->Read(wxT("/SamplingRate/DefaultProjectSampleRate"),
AudioIOBase::GetOptimalSupportedSampleRate());
mRate = (double) QualitySettings::DefaultSampleRate.Read();
// Selection mode of 0 means showing 'start' and 'end' only.
mSelectionMode = gPrefs->ReadLong(wxT("/SelectionToolbarMode"), 0);