comparison data/fileio/DecodingWavFileReader.cpp @ 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
comparison
equal deleted inserted replaced
1040:a1cd5abcb38b 1041:843f67be0ed9
72 for (sv_frame_t i = 0; i < total; i += blockSize) { 72 for (sv_frame_t i = 0; i < total; i += blockSize) {
73 73
74 sv_frame_t count = blockSize; 74 sv_frame_t count = blockSize;
75 if (i + count > total) count = total - i; 75 if (i + count > total) count = total - i;
76 76
77 m_original->getInterleavedFrames(i, count, block); 77 block = m_original->getInterleavedFrames(i, count);
78 addBlock(block); 78 addBlock(block);
79 79
80 if (m_cancelled) break; 80 if (m_cancelled) break;
81 } 81 }
82 82
129 for (sv_frame_t i = 0; i < total; i += blockSize) { 129 for (sv_frame_t i = 0; i < total; i += blockSize) {
130 130
131 sv_frame_t count = blockSize; 131 sv_frame_t count = blockSize;
132 if (i + count > total) count = total - i; 132 if (i + count > total) count = total - i;
133 133
134 m_reader->m_original->getInterleavedFrames(i, count, block); 134 block = m_reader->m_original->getInterleavedFrames(i, count);
135 m_reader->addBlock(block); 135 m_reader->addBlock(block);
136 136
137 if (m_reader->m_cancelled) break; 137 if (m_reader->m_cancelled) break;
138 } 138 }
139 139