comparison base/Preferences.h @ 921:2896b8872834 tonioni

Add normalise preference and take it into account in WaveFileModel
author Chris Cannam
date Fri, 13 Jun 2014 16:12:00 +0100
parents 4c7b4040bd2d
children 344c9ea90181
comparison
equal deleted inserted replaced
920:f3cda3280398 921:2896b8872834
70 int getFixedSampleRate() const { return m_fixedSampleRate; } 70 int getFixedSampleRate() const { return m_fixedSampleRate; }
71 71
72 /// True if we should resample second or subsequent audio file to match first audio file's rate 72 /// True if we should resample second or subsequent audio file to match first audio file's rate
73 bool getResampleOnLoad() const { return m_resampleOnLoad; } 73 bool getResampleOnLoad() const { return m_resampleOnLoad; }
74 74
75 /// True if audio files should be loaded with normalisation (max == 1)
76 bool getNormaliseAudio() const { return m_normaliseAudio; }
77
75 enum BackgroundMode { 78 enum BackgroundMode {
76 BackgroundFromTheme, 79 BackgroundFromTheme,
77 DarkBackground, 80 DarkBackground,
78 LightBackground 81 LightBackground
79 }; 82 };
111 void setResampleQuality(int quality); 114 void setResampleQuality(int quality);
112 void setOmitTempsFromRecentFiles(bool omit); 115 void setOmitTempsFromRecentFiles(bool omit);
113 void setTemporaryDirectoryRoot(QString tempDirRoot); 116 void setTemporaryDirectoryRoot(QString tempDirRoot);
114 void setFixedSampleRate(int); 117 void setFixedSampleRate(int);
115 void setResampleOnLoad(bool); 118 void setResampleOnLoad(bool);
119 void setNormaliseAudio(bool);
116 void setBackgroundMode(BackgroundMode mode); 120 void setBackgroundMode(BackgroundMode mode);
117 void setTimeToTextMode(TimeToTextMode mode); 121 void setTimeToTextMode(TimeToTextMode mode);
118 void setOctaveOfMiddleC(int oct); 122 void setOctaveOfMiddleC(int oct);
119 void setViewFontSize(int size); 123 void setViewFontSize(int size);
120 void setShowSplash(bool); 124 void setShowSplash(bool);
146 int m_resampleQuality; 150 int m_resampleQuality;
147 bool m_omitRecentTemps; 151 bool m_omitRecentTemps;
148 QString m_tempDirRoot; 152 QString m_tempDirRoot;
149 int m_fixedSampleRate; 153 int m_fixedSampleRate;
150 bool m_resampleOnLoad; 154 bool m_resampleOnLoad;
155 bool m_normaliseAudio;
151 int m_viewFontSize; 156 int m_viewFontSize;
152 BackgroundMode m_backgroundMode; 157 BackgroundMode m_backgroundMode;
153 TimeToTextMode m_timeToTextMode; 158 TimeToTextMode m_timeToTextMode;
154 int m_octave; 159 int m_octave;
155 bool m_showSplash; 160 bool m_showSplash;