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
diff options
context:
space:
mode:
Diffstat (limited to 'source/blender/editors/space_sequencer/sequencer_draw.c')
-rw-r--r--source/blender/editors/space_sequencer/sequencer_draw.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/source/blender/editors/space_sequencer/sequencer_draw.c b/source/blender/editors/space_sequencer/sequencer_draw.c
index 70735a8ec82..662be2491a0 100644
--- a/source/blender/editors/space_sequencer/sequencer_draw.c
+++ b/source/blender/editors/space_sequencer/sequencer_draw.c
@@ -242,7 +242,6 @@ static void draw_seq_waveform(View2D *v2d,
int x2_offset = min_ff(v2d->cur.xmax + 1.0f, x2);
if (seq->sound && ((sseq->flag & SEQ_ALL_WAVEFORMS) || (seq->flag & SEQ_AUDIO_DRAW_WAVEFORM))) {
- int i, j, p;
int length = floor((x2_offset - x1_offset) / stepsize) + 1;
float ymid = (y1 + y2) / 2.0f;
float yscale = (y2 - y1) / 2.0f;
@@ -303,15 +302,15 @@ static void draw_seq_waveform(View2D *v2d,
immBindBuiltinProgram(GPU_SHADER_2D_FLAT_COLOR);
immBegin(GPU_PRIM_TRI_STRIP, length * 2);
- for (i = 0; i < length; i++) {
+ for (int i = 0; i < length; i++) {
float sampleoffset = startsample + ((x1_offset - x1) / stepsize + i) * samplestep;
- p = sampleoffset;
+ int p = sampleoffset;
value1 = waveform->data[p * 3];
value2 = waveform->data[p * 3 + 1];
if (samplestep > 1.0f) {
- for (j = p + 1; (j < waveform->length) && (j < p + samplestep); j++) {
+ for (int j = p + 1; (j < waveform->length) && (j < p + samplestep); j++) {
if (value1 > waveform->data[j * 3]) {
value1 = waveform->data[j * 3];
}