mirror of
https://github.com/cookiengineer/audacity
synced 2025-06-16 16:10:06 +02:00
Bug 1977 - Simpler rule for 'Default sample rate' and 'Project rate'.
After discussion it was felt that only using 'Default sample rate' for new projects was better.
This commit is contained in:
parent
98073f7696
commit
cbe778adb5
@ -1351,6 +1351,10 @@ void AudacityProject::UpdatePrefsVariables()
|
||||
gPrefs->Read(wxT("/GUI/TracksFitVerticallyZoomed"), &mTracksFitVerticallyZoomed, false);
|
||||
// gPrefs->Read(wxT("/GUI/UpdateSpectrogram"), &mViewInfo.bUpdateSpectrogram, true);
|
||||
|
||||
// This code to change an empty projects rate is currently disabled, after discussion.
|
||||
// The rule 'Default sample rate' only affects newly created projects was felt to
|
||||
// be simpler and better.
|
||||
#if 0
|
||||
// The DefaultProjectSample rate is the rate for new projects.
|
||||
// Do not change this project's rate, unless there are no tracks.
|
||||
if( GetTrackCount() == 0){
|
||||
@ -1361,6 +1365,8 @@ void AudacityProject::UpdatePrefsVariables()
|
||||
bar->SetRate( mRate );
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
mDefaultFormat = QualityPrefs::SampleFormatChoice();
|
||||
|
||||
gPrefs->Read(wxT("/AudioIO/SeekShortPeriod"), &mSeekShort, 1.0);
|
||||
|
@ -117,7 +117,6 @@ SelectionBar::SelectionBar()
|
||||
// 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.
|
||||
// We could just use AudioIO::GetOptimalSupportedSampleRate() here.
|
||||
mRate = (double) gPrefs->Read(wxT("/SamplingRate/DefaultProjectSampleRate"),
|
||||
AudioIO::GetOptimalSupportedSampleRate());
|
||||
|
||||
@ -344,11 +343,11 @@ void SelectionBar::Populate()
|
||||
void SelectionBar::UpdatePrefs()
|
||||
{
|
||||
// The project rate is no longer driven from here.
|
||||
// IF /SamplingRate/DefaultProjectSampleRate has changed, that is sent to the project.
|
||||
// IF the project has no tracks, then the project updates its sample rate, and
|
||||
// signals that back to the SelectionBar via SetRate().
|
||||
// Usually though there are tracks, and changes to that pref will only affect new
|
||||
// or empty projects.
|
||||
// When preferences change, the Project learns about it too.
|
||||
// If necessary we can drive the SelectionBar mRate via the Project
|
||||
// calling our SetRate().
|
||||
// As of 13-Sep-2018, changes to the sample rate pref will only affect
|
||||
// creation of new projects, not the smaple rate in existing ones.
|
||||
|
||||
wxCommandEvent e;
|
||||
e.SetInt(mStartTime->GetFormatIndex());
|
||||
|
Loading…
x
Reference in New Issue
Block a user