diff options
author | Sebastian Parborg <darkdefende@gmail.com> | 2021-07-01 19:51:26 +0300 |
---|---|---|
committer | Sebastian Parborg <darkdefende@gmail.com> | 2021-08-16 16:12:19 +0300 |
commit | 2946f72a2a1f4afc4967ceda28df4294de304b81 (patch) | |
tree | 1dff14e51a381aea185303a0e5928e03762158c0 /extern | |
parent | ded68fb10275c9f9a66e7019171b83cab0e9485d (diff) |
VSE: Use lines to draw waveform
Refactor and improve waveform drawing.
Drawing now can use line strips to draw waveforms instead of only
triangle strips. This makes us able to properly visualize thin waveforms
as they would not be visible before. We now also draw the RMS value of
the waveform.
The waveform drawing is now also properly aligned to the screen pixels
to avoid flickering when transforming the strip.
Reviewed By: Richard Antalik
Differential Revision: https://developer.blender.org/D11184
Diffstat (limited to 'extern')
-rw-r--r-- | extern/audaspace/bindings/C/AUD_Special.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/extern/audaspace/bindings/C/AUD_Special.cpp b/extern/audaspace/bindings/C/AUD_Special.cpp index 97e5f5540de..5cc33525d1d 100644 --- a/extern/audaspace/bindings/C/AUD_Special.cpp +++ b/extern/audaspace/bindings/C/AUD_Special.cpp @@ -247,7 +247,7 @@ AUD_API int AUD_readSound(AUD_Sound* sound, float* buffer, int length, int sampl buffer[i * 3] = min; buffer[i * 3 + 1] = max; - buffer[i * 3 + 2] = sqrt(power) / len; + buffer[i * 3 + 2] = sqrt(power / len); // RMS if(overallmax < max) overallmax = max; |