fix volume normalization in the audio waveform display thing
AbandonedPublic

Authored by sandsmark on Jan 1 2020, 10:24 PM.

Details

Reviewers
mardelle
Group Reviewers
Kdenlive
Summary

noticed that the preview "clipped" even if sound doesn't do it, and apparently 256 is not the max value there.

also tested converting from voltage to loudness but it kind of looked crappier so I assume something else does it for us.

Test Plan

loaded in a couple of different video clips and the waveforms looked better.

Diff Detail

Repository
R158 Kdenlive
Lint
Lint Skipped
Unit
Unit Tests Skipped
sandsmark requested review of this revision.Jan 1 2020, 10:24 PM
sandsmark created this revision.
sandsmark added a subscriber: mardelle.
frdbr added a subscriber: frdbr.Jan 6 2020, 8:12 PM

Thanks for your contribution. I used it as a base to fix the problem in a slightly different way (Fix the values at the time they are generated, not when displaying them in timeline). Hope it's ok for you :
https://invent.kde.org/kde/kdenlive/commit/3f267699c20c3e56f34d188ca74247edd9642aac

sandsmark abandoned this revision.Jan 19 2020, 1:24 PM

Of course, I just wasn't sure where else there could be assumptions on the values, so I wanted to keep it minimal. So your fix seems better. :-)