comparison data/fileio/CodedAudioFileReader.h @ 1307:c84629395040 mp3-gapless

Handle trimming the padding from end as well
author Chris Cannam
date Tue, 29 Nov 2016 13:34:51 +0000
parents b325e91505b5
children f830a10bfbd6
comparison
equal deleted inserted replaced
1306:b325e91505b5 1307:c84629395040
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: 65 // compensation for encoder delays:
66 void setSamplesToTrim(sv_frame_t fromStart, sv_frame_t fromEnd); 66 void setFramesToTrim(sv_frame_t fromStart, sv_frame_t fromEnd);
67 67
68 // may throw InsufficientDiscSpace: 68 // may throw InsufficientDiscSpace:
69 void addSamplesToDecodeCache(float **samples, sv_frame_t nframes); 69 void addSamplesToDecodeCache(float **samples, sv_frame_t nframes);
70 void addSamplesToDecodeCache(float *samplesInterleaved, sv_frame_t nframes); 70 void addSamplesToDecodeCache(float *samplesInterleaved, sv_frame_t nframes);
71 void addSamplesToDecodeCache(const std::vector<float> &interleaved); 71 void addSamplesToDecodeCache(const std::vector<float> &interleaved);
100 100
101 QString m_cacheFileName; 101 QString m_cacheFileName;
102 SNDFILE *m_cacheFileWritePtr; 102 SNDFILE *m_cacheFileWritePtr;
103 WavFileReader *m_cacheFileReader; 103 WavFileReader *m_cacheFileReader;
104 float *m_cacheWriteBuffer; 104 float *m_cacheWriteBuffer;
105 sv_frame_t m_cacheWriteBufferIndex; 105 sv_frame_t m_cacheWriteBufferIndex; // samples
106 sv_frame_t m_cacheWriteBufferSize; // frames 106 sv_frame_t m_cacheWriteBufferSize; // frames
107 107
108 Resampler *m_resampler; 108 Resampler *m_resampler;
109 float *m_resampleBuffer; 109 float *m_resampleBuffer;
110 sv_frame_t m_fileFrameCount; 110 sv_frame_t m_fileFrameCount;