Mercurial > hg > svcore
comparison data/model/ReadOnlyWaveFileModel.cpp @ 1280:c97a28a3baeb 3.0-integration
Trivial loop reordering for sequential index
author | Chris Cannam |
---|---|
date | Wed, 23 Nov 2016 10:34:30 +0000 |
parents | a68d407f9752 |
children | ff9697592bef |
comparison
equal
deleted
inserted
replaced
1279:0a9193dc136b | 1280:c97a28a3baeb |
---|---|
232 for (int i = 0; i < obtained; ++i) { | 232 for (int i = 0; i < obtained; ++i) { |
233 result[i] = interleaved[i * channels + channel]; | 233 result[i] = interleaved[i * channels + channel]; |
234 } | 234 } |
235 } else { | 235 } else { |
236 // channel == -1, mix down all channels | 236 // channel == -1, mix down all channels |
237 for (int c = 0; c < channels; ++c) { | 237 for (int i = 0; i < obtained; ++i) { |
238 for (int i = 0; i < obtained; ++i) { | 238 for (int c = 0; c < channels; ++c) { |
239 result[i] += interleaved[i * channels + c]; | 239 result[i] += interleaved[i * channels + c]; |
240 } | 240 } |
241 } | 241 } |
242 } | 242 } |
243 | 243 |