1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-12-09 06:06:24 +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

@@ -27,7 +27,7 @@
#include "../commands/CommandManager.h"
#include "../effects/EffectManager.h"
#include "../effects/EffectUI.h"
#include "../prefs/QualityPrefs.h"
#include "../prefs/QualitySettings.h"
#include "../tracks/playabletrack/wavetrack/ui/WaveTrackControls.h"
#include "../widgets/ASlider.h"
#include "../widgets/AudacityMessageBox.h"
@@ -52,7 +52,7 @@ void DoMixAndRender
auto &tracks = TrackList::Get( project );
auto &trackFactory = WaveTrackFactory::Get( project );
auto rate = settings.GetRate();
auto defaultFormat = QualityPrefs::SampleFormatChoice();
auto defaultFormat = QualitySettings::SampleFormatChoice();
auto &trackPanel = TrackPanel::Get( project );
auto &window = ProjectWindow::Get( project );
@@ -609,7 +609,7 @@ void OnNewWaveTrack(const CommandContext &context)
auto &trackFactory = WaveTrackFactory::Get( project );
auto &window = ProjectWindow::Get( project );
auto defaultFormat = QualityPrefs::SampleFormatChoice();
auto defaultFormat = QualitySettings::SampleFormatChoice();
auto rate = settings.GetRate();
@@ -633,7 +633,7 @@ void OnNewStereoTrack(const CommandContext &context)
auto &trackFactory = WaveTrackFactory::Get( project );
auto &window = ProjectWindow::Get( project );
auto defaultFormat = QualityPrefs::SampleFormatChoice();
auto defaultFormat = QualitySettings::SampleFormatChoice();
auto rate = settings.GetRate();
SelectUtilities::SelectNone( project );