Mercurial > hg > svcore
diff data/fileio/test/AudioFileReaderTest.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 | abfc498c52bc |
line wrap: on
line diff
--- a/data/fileio/test/AudioFileReaderTest.h Wed Mar 04 12:01:04 2015 +0000 +++ b/data/fileio/test/AudioFileReaderTest.h Wed Mar 04 12:30:41 2015 +0000 @@ -95,14 +95,12 @@ float *reference = tdata.getInterleavedData(); sv_frame_t refFrames = tdata.getFrameCount(); - vector<float> test; - // The reader should give us exactly the expected number of // frames, except for mp3/aac files. We ask for quite a lot // more, though, so we can (a) check that we only get the // expected number back (if this is not mp3/aac) or (b) take // into account silence at beginning and end (if it is). - reader->getInterleavedFrames(0, refFrames + 5000, test); + vector<float> test = reader->getInterleavedFrames(0, refFrames + 5000); sv_frame_t read = test.size() / channels; if (extension == "mp3" || extension == "aac" || extension == "m4a") {