Mercurial > hg > svcore
diff data/fileio/AudioFileReader.h @ 1041:843f67be0ed9 cxx11
Replace the get*Frames calls in AudioFileReader with less stupid API
author | Chris Cannam |
---|---|
date | Wed, 04 Mar 2015 12:30:41 +0000 |
parents | a1cd5abcb38b |
children | 4d9816ba0ebe |
line wrap: on
line diff
--- a/data/fileio/AudioFileReader.h Wed Mar 04 12:01:04 2015 +0000 +++ b/data/fileio/AudioFileReader.h Wed Mar 04 12:30:41 2015 +0000 @@ -94,8 +94,7 @@ * thread-safe -- that is, safe to call from multiple threads with * different arguments on the same object at the same time. */ - virtual void getInterleavedFrames(sv_frame_t start, sv_frame_t count, - SampleBlock &frames) const = 0; + virtual SampleBlock getInterleavedFrames(sv_frame_t start, sv_frame_t count) const = 0; /** * Return de-interleaved samples for count frames from index @@ -104,8 +103,7 @@ * will contain getChannelCount() sample blocks of count samples * each (or fewer if end of file is reached). */ - virtual void getDeInterleavedFrames(sv_frame_t start, sv_frame_t count, - std::vector<SampleBlock> &frames) const; + virtual std::vector<SampleBlock> getDeInterleavedFrames(sv_frame_t start, sv_frame_t count) const; // only subclasses that do not know exactly how long the audio // file is until it's been completely decoded should implement this