Mercurial > hg > svcore
comparison data/fileio/AudioFileReader.cpp @ 936:0c1d6de8f44b
Merge from branch warnfix_no_size_t
author | Chris Cannam |
---|---|
date | Wed, 18 Jun 2014 13:51:16 +0100 |
parents | 59e7fe1b1003 |
children | cc27f35aa75c |
comparison
equal
deleted
inserted
replaced
917:49618f39ff09 | 936:0c1d6de8f44b |
---|---|
14 */ | 14 */ |
15 | 15 |
16 #include "AudioFileReader.h" | 16 #include "AudioFileReader.h" |
17 | 17 |
18 void | 18 void |
19 AudioFileReader::getDeInterleavedFrames(size_t start, size_t count, | 19 AudioFileReader::getDeInterleavedFrames(int start, int count, |
20 std::vector<SampleBlock> &frames) const | 20 std::vector<SampleBlock> &frames) const |
21 { | 21 { |
22 SampleBlock interleaved; | 22 SampleBlock interleaved; |
23 getInterleavedFrames(start, count, interleaved); | 23 getInterleavedFrames(start, count, interleaved); |
24 | 24 |
25 size_t channels = getChannelCount(); | 25 int channels = getChannelCount(); |
26 size_t rc = interleaved.size() / channels; | 26 int rc = interleaved.size() / channels; |
27 | 27 |
28 frames.clear(); | 28 frames.clear(); |
29 | 29 |
30 for (size_t c = 0; c < channels; ++c) { | 30 for (int c = 0; c < channels; ++c) { |
31 frames.push_back(SampleBlock()); | 31 frames.push_back(SampleBlock()); |
32 } | 32 } |
33 | 33 |
34 for (size_t i = 0; i < rc; ++i) { | 34 for (int i = 0; i < rc; ++i) { |
35 for (size_t c = 0; c < channels; ++c) { | 35 for (int c = 0; c < channels; ++c) { |
36 frames[c].push_back(interleaved[i * channels + c]); | 36 frames[c].push_back(interleaved[i * channels + c]); |
37 } | 37 } |
38 } | 38 } |
39 } | 39 } |
40 | 40 |