comparison runner/MultiplexedReader.cpp @ 258:857ce6ecb163 piper-nopiper

Align Sonic Annotator with the new Piper-ified subrepos (bearing in mind we want neither Piper nor the plugin load checker in Sonic Annotator itself)
author Chris Cannam
date Fri, 04 Nov 2016 14:16:01 +0000
parents d0fe861bb116
children 68dc2d99a5b1
comparison
equal deleted inserted replaced
257:46d3a6461b4a 258:857ce6ecb163
47 foreach (AudioFileReader *r, m_readers) { 47 foreach (AudioFileReader *r, m_readers) {
48 delete r; 48 delete r;
49 } 49 }
50 } 50 }
51 51
52 SampleBlock 52 std::vector<float>
53 MultiplexedReader::getInterleavedFrames(sv_frame_t start, sv_frame_t frameCount) const 53 MultiplexedReader::getInterleavedFrames(sv_frame_t start, sv_frame_t frameCount) const
54 { 54 {
55 int out_chans = m_readers.size(); 55 int out_chans = m_readers.size();
56 56
57 // Allocate and zero 57 // Allocate and zero
58 SampleBlock block(frameCount * out_chans, 0.f); 58 std::vector<float> block(frameCount * out_chans, 0.f);
59 59
60 for (int out_chan = 0; out_chan < out_chans; ++out_chan) { 60 for (int out_chan = 0; out_chan < out_chans; ++out_chan) {
61 61
62 AudioFileReader *reader = m_readers[out_chan]; 62 AudioFileReader *reader = m_readers[out_chan];
63 SampleBlock readerBlock = reader->getInterleavedFrames(start, frameCount); 63 auto readerBlock = reader->getInterleavedFrames(start, frameCount);
64 64
65 int in_chans = reader->getChannelCount(); 65 int in_chans = reader->getChannelCount();
66 66
67 for (int frame = 0; frame < frameCount; ++frame) { 67 for (int frame = 0; frame < frameCount; ++frame) {
68 68