comparison data/fileio/CodedAudioFileReader.h @ 1305:9f9f55a8af92 mp3-gapless

Add gapless flag to MP3FileReader, and implement trimming the delay samples from the start (padding is not yet trimmed from end)
author Chris Cannam
date Tue, 29 Nov 2016 11:35:56 +0000
parents 40c042780bc9
children b325e91505b5
comparison
equal deleted inserted replaced
1304:7cff8367d9b1 1305:9f9f55a8af92
60 sv_samplerate_t targetRate, 60 sv_samplerate_t targetRate,
61 bool normalised); 61 bool normalised);
62 62
63 void initialiseDecodeCache(); // samplerate, channels must have been set 63 void initialiseDecodeCache(); // samplerate, channels must have been set
64 64
65 // compensation for encoder delays:
66 void setSamplesToTrim(sv_frame_t fromStart, sv_frame_t fromEnd);
67
65 // may throw InsufficientDiscSpace: 68 // may throw InsufficientDiscSpace:
66 void addSamplesToDecodeCache(float **samples, sv_frame_t nframes); 69 void addSamplesToDecodeCache(float **samples, sv_frame_t nframes);
67 void addSamplesToDecodeCache(float *samplesInterleaved, sv_frame_t nframes); 70 void addSamplesToDecodeCache(float *samplesInterleaved, sv_frame_t nframes);
68 void addSamplesToDecodeCache(const std::vector<float> &interleaved); 71 void addSamplesToDecodeCache(const std::vector<float> &interleaved);
69 72
102 105
103 bool m_normalised; 106 bool m_normalised;
104 float m_max; 107 float m_max;
105 float m_gain; 108 float m_gain;
106 109
110 sv_frame_t m_trimFromStart;
111 sv_frame_t m_trimFromEnd;
112
107 sv_frame_t m_clippedCount; 113 sv_frame_t m_clippedCount;
108 sv_frame_t m_firstNonzero; 114 sv_frame_t m_firstNonzero;
109 sv_frame_t m_lastNonzero; 115 sv_frame_t m_lastNonzero;
110 }; 116 };
111 117