comparison data/fileio/AudioFileReader.h @ 1326:54af1e21705c 3.0-integration

Update to use bqvec allocator for float vectors
author Chris Cannam
date Tue, 13 Dec 2016 15:23:21 +0000
parents ff9697592bef
children ad5f892c0c4d f8e3dcbafb4d
comparison
equal deleted inserted replaced
1325:3aea4f7617bb 1326:54af1e21705c
115 * 115 *
116 * The subclass implementations of this function must be 116 * The subclass implementations of this function must be
117 * thread-safe -- that is, safe to call from multiple threads with 117 * thread-safe -- that is, safe to call from multiple threads with
118 * different arguments on the same object at the same time. 118 * different arguments on the same object at the same time.
119 */ 119 */
120 virtual std::vector<float> getInterleavedFrames(sv_frame_t start, 120 virtual floatvec_t getInterleavedFrames(sv_frame_t start,
121 sv_frame_t count) const = 0; 121 sv_frame_t count) const = 0;
122 122
123 /** 123 /**
124 * Return de-interleaved samples for count frames from index 124 * Return de-interleaved samples for count frames from index
125 * start. Implemented in this class (it calls 125 * start. Implemented in this class (it calls
126 * getInterleavedFrames and de-interleaves). The resulting vector 126 * getInterleavedFrames and de-interleaves). The resulting vector
127 * will contain getChannelCount() sample blocks of count samples 127 * will contain getChannelCount() sample blocks of count samples
128 * each (or fewer if end of file is reached). 128 * each (or fewer if end of file is reached).
129 */ 129 */
130 virtual std::vector<std::vector<float> > getDeInterleavedFrames(sv_frame_t start, 130 virtual std::vector<floatvec_t> getDeInterleavedFrames(sv_frame_t start,
131 sv_frame_t count) const; 131 sv_frame_t count) const;
132 132
133 // only subclasses that do not know exactly how long the audio 133 // only subclasses that do not know exactly how long the audio
134 // file is until it's been completely decoded should implement this 134 // file is until it's been completely decoded should implement this
135 virtual int getDecodeCompletion() const { return 100; } // % 135 virtual int getDecodeCompletion() const { return 100; } // %
136 136