comparison data/fileio/CodedAudioFileReader.h @ 920:f3cda3280398 tonioni

Add normalised option to CodedAudioFileReader
author Chris Cannam
date Fri, 13 Jun 2014 16:03:48 +0100
parents f0558e69a074
children d03b3d956358
comparison
equal deleted inserted replaced
919:4c7b4040bd2d 920:f3cda3280398
48 48
49 signals: 49 signals:
50 void progress(int); 50 void progress(int);
51 51
52 protected: 52 protected:
53 CodedAudioFileReader(CacheMode cacheMode, size_t targetRate); 53 CodedAudioFileReader(CacheMode cacheMode,
54 size_t targetRate,
55 bool normalised);
54 56
55 void initialiseDecodeCache(); // samplerate, channels must have been set 57 void initialiseDecodeCache(); // samplerate, channels must have been set
56 58
57 // may throw InsufficientDiscSpace: 59 // may throw InsufficientDiscSpace:
58 void addSamplesToDecodeCache(float **samples, size_t nframes); 60 void addSamplesToDecodeCache(float **samples, size_t nframes);
89 size_t m_cacheWriteBufferSize; // frames 91 size_t m_cacheWriteBufferSize; // frames
90 92
91 Resampler *m_resampler; 93 Resampler *m_resampler;
92 float *m_resampleBuffer; 94 float *m_resampleBuffer;
93 size_t m_fileFrameCount; 95 size_t m_fileFrameCount;
96
97 bool m_normalised;
98 float m_max;
99 float m_gain;
94 }; 100 };
95 101
96 #endif 102 #endif