Commit d8170f00 authored by Jean-Baptiste Mardelle's avatar Jean-Baptiste Mardelle
Browse files

Fix audio wave for non stereo clips

parent 817e35be
......@@ -110,7 +110,7 @@ void AudioLevelsTask::run()
// convert cached image
int n = image.width() * image.height();
for (int i = 0; n > 1 && i < n; i++) {
QRgb p = image.pixel(i / 2, i % channels);
QRgb p = image.pixel(i / channels, i % channels);
mltLevels << qRed(p);
mltLevels << qGreen(p);
mltLevels << qBlue(p);
......@@ -228,7 +228,7 @@ void AudioLevelsTask::run()
int a = last;
p = qRgba(r, g, b, a);
}
image.setPixel(i / 2, i % channels, p);
image.setPixel(i / channels, i % channels, p);
}
image.save(cachePath);
audioCreated = true;
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment