Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mpc-hc/sanear.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'src/DspTempo2.cpp')
-rw-r--r--src/DspTempo2.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/DspTempo2.cpp b/src/DspTempo2.cpp
index d425810..f94f293 100644
--- a/src/DspTempo2.cpp
+++ b/src/DspTempo2.cpp
@@ -102,8 +102,9 @@ namespace SaneAudioRenderer
float* inputData = (float*)chunk.GetData();
- for (size_t i = 0, n = chunk.GetSampleCount(); i < n; i++)
- outputData[i % m_channels][i / m_channels] = inputData[i];
+ for (size_t channel = 0; channel < m_channels; channel++)
+ for (size_t i = 0, n = chunk.GetFrameCount(); i < n; i++)
+ outputData[channel][i] = inputData[channel + i * m_channels];
chunk = std::move(output);