Mercurial > hg > svcore
diff data/fileio/WavFileReader.h @ 1520:954d0cf29ca7 import-audio-data
Switch the normalisation option in WritableWaveFileModel from normalising on read to normalising on write, so that the saved file is already normalised and therefore can be read again without having to remember to normalise it
author | Chris Cannam |
---|---|
date | Wed, 12 Sep 2018 13:56:56 +0100 |
parents | 75d92155fa20 |
children | c01cbe41aeb5 f8e3dcbafb4d |
line wrap: on
line diff
--- a/data/fileio/WavFileReader.h Tue Sep 11 14:36:51 2018 +0100 +++ b/data/fileio/WavFileReader.h Wed Sep 12 13:56:56 2018 +0100 @@ -41,9 +41,11 @@ class WavFileReader : public AudioFileReader { public: + enum class Normalisation { None, Peak }; + WavFileReader(FileSource source, bool fileUpdating = false, - bool normalise = false); + Normalisation normalise = Normalisation::None); virtual ~WavFileReader(); virtual QString getLocation() const { return m_source.getLocation(); } @@ -87,7 +89,7 @@ mutable sv_frame_t m_lastStart; mutable sv_frame_t m_lastCount; - bool m_normalise; + Normalisation m_normalisation; float m_max; bool m_updating;