Skip to content

Commit

Permalink
Fix preference option for re-analyzing beatgrids imported from other …
Browse files Browse the repository at this point in the history
…software
  • Loading branch information
ninomp committed Sep 16, 2021
1 parent 23b8a60 commit 1ebaf67
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 1 deletion.
1 change: 1 addition & 0 deletions src/analyzer/analyzerbeats.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@ bool AnalyzerBeats::initialize(TrackPointer pTrack, int sampleRate, int totalSam
<< "\nPlugin:" << m_pluginId
<< "\nFixed tempo assumption:" << m_bPreferencesFixedTempo
<< "\nRe-analyze when settings change:" << m_bPreferencesReanalyzeOldBpm
<< "\nRe-analyze imported from other software:" << m_bPreferencesReanalyzeImported
<< "\nFast analysis:" << m_bPreferencesFastAnalysis;

m_sampleRate = sampleRate;
Expand Down
6 changes: 5 additions & 1 deletion src/preferences/beatdetectionsettings.h
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,11 @@ class BeatDetectionSettings {
DEFINE_PREFERENCE_HELPERS(ReanalyzeWhenSettingsChange, bool,
BPM_CONFIG_KEY, BPM_REANALYZE_WHEN_SETTINGS_CHANGE, false);

DEFINE_PREFERENCE_HELPERS(ReanalyzeImported, bool, BPM_CONFIG_KEY, BPM_REANALYZE_WHEN_SETTINGS_CHANGE, false);
DEFINE_PREFERENCE_HELPERS(ReanalyzeImported,
bool,
BPM_CONFIG_KEY,
BPM_REANALYZE_IMPORTED,
false);

DEFINE_PREFERENCE_HELPERS(FastAnalysis, bool,
BPM_CONFIG_KEY, BPM_FAST_ANALYSIS_ENABLED, false);
Expand Down
2 changes: 2 additions & 0 deletions src/preferences/dialog/dlgprefbeats.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ void DlgPrefBeats::loadSettings() {
m_bAnalyzerEnabled = m_bpmSettings.getBpmDetectionEnabled();
m_bFixedTempoEnabled = m_bpmSettings.getFixedTempoAssumption();
m_bReanalyze = m_bpmSettings.getReanalyzeWhenSettingsChange();
m_bReanalyzeImported = m_bpmSettings.getReanalyzeImported();
m_bFastAnalysisEnabled = m_bpmSettings.getFastAnalysis();

slotUpdate();
Expand All @@ -74,6 +75,7 @@ void DlgPrefBeats::slotResetToDefaults() {
m_bFixedTempoEnabled = m_bpmSettings.getFixedTempoAssumptionDefault();
m_bFastAnalysisEnabled = m_bpmSettings.getFastAnalysisDefault();
m_bReanalyze = m_bpmSettings.getReanalyzeWhenSettingsChangeDefault();
m_bReanalyzeImported = m_bpmSettings.getReanalyzeImportedDefault();

slotUpdate();
}
Expand Down

0 comments on commit 1ebaf67

Please sign in to comment.