diff options
author | Joerg Mueller <nexyon@gmail.com> | 2010-07-17 17:41:22 +0400 |
---|---|---|
committer | Joerg Mueller <nexyon@gmail.com> | 2010-07-17 17:41:22 +0400 |
commit | fd982af4471d55e756629c0aeffe60fe8f5b4687 (patch) | |
tree | 56e42f14e2dd576d366b2fef2cbe35efbfd44a76 /source/blender/editors | |
parent | 06193537edfd0635b8a6edabf1ea2f87eb33b8c6 (diff) |
Merging revision 30434 from my GSoC branch, log: Fixed sound wave display bug for sounds that are not full length.
Diffstat (limited to 'source/blender/editors')
-rw-r--r-- | source/blender/editors/space_sequencer/sequencer_draw.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/source/blender/editors/space_sequencer/sequencer_draw.c b/source/blender/editors/space_sequencer/sequencer_draw.c index 62fe9dc96b7..4955450fc22 100644 --- a/source/blender/editors/space_sequencer/sequencer_draw.c +++ b/source/blender/editors/space_sequencer/sequencer_draw.c @@ -168,7 +168,7 @@ static void get_seq_color3ubv(Scene *curscene, Sequence *seq, char *col) } } -static void drawseqwave(Sequence *seq, float x1, float y1, float x2, float y2, float stepsize) +static void drawseqwave(Scene *scene, Sequence *seq, float x1, float y1, float x2, float y2, float stepsize) { /* x1 is the starting x value to draw the wave, @@ -184,7 +184,9 @@ static void drawseqwave(Sequence *seq, float x1, float y1, float x2, float y2, f float* samples = MEM_mallocN(length * sizeof(float) * 2, "seqwave_samples"); if(!samples) return; - if(sound_read_sound_buffer(seq->sound, samples, length) != length) + if(sound_read_sound_buffer(seq->sound, samples, length, + (seq->startofs + seq->anim_startofs)/FPS, + (seq->startofs + seq->anim_startofs + seq->enddisp - seq->startdisp)/FPS) != length) { MEM_freeN(samples); return; @@ -636,7 +638,7 @@ static void draw_seq_strip(Scene *scene, ARegion *ar, SpaceSeq *sseq, Sequence * x2= seq->enddisp; /* draw sound wave */ - if(seq->type == SEQ_SOUND) drawseqwave(seq, x1, y1, x2, y2, (ar->v2d.cur.xmax - ar->v2d.cur.xmin)/ar->winx); + if(seq->type == SEQ_SOUND) drawseqwave(scene, seq, x1, y1, x2, y2, (ar->v2d.cur.xmax - ar->v2d.cur.xmin)/ar->winx); get_seq_color3ubv(scene, seq, col); if (G.moving && (seq->flag & SELECT)) { |