diff --git a/decoder.cpp b/decoder.cpp index 0a3bf58..450762c 100644 --- a/decoder.cpp +++ b/decoder.cpp @@ -96,7 +96,7 @@ emscripten::val Decoder::decode(uint32_t count) for (int j = 0; j < samplesPerFrame; ++j) { for (int k = 0; k < channels; ++k) { float value = mad_f_todouble(synth->pcm.samples[k][j]); - chans[k].set(std::to_string(success * samplesPerFrame + j), emscripten::val(value)); + chans[k].set(std::to_string(i * samplesPerFrame + j), emscripten::val(value)); } } }