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

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/extern
diff options
context:
space:
mode:
authorSebastian Parborg <darkdefende@gmail.com>2021-07-01 19:51:26 +0300
committerJeroen Bakker <jeroen@blender.org>2021-08-23 12:53:18 +0300
commitc634d859b216602d3d479966a5e48a433777ddce (patch)
tree1ae127fbf460e27fbad351ecfe42ffca41ac131e /extern
parent489df7ac88ce06a1b6efcecf5cd27dcfb8c4efbd (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.cpp2
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;