mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-25 16:07:49 +01:00
Fix glitches in automation events due to the other glitch fix made a few weeks ago.
It would be more elegant to fix the other glitch so it aligns the buffers correctly (so they do not add the offset to the buffer pointers), but that might need design changes. git-svn-id: svn://localhost/ardour2/branches/2.0-ongoing@3693 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
parent
5da039e5fd
commit
82aec01403
1 changed files with 15 additions and 2 deletions
|
|
@ -428,16 +428,25 @@ PluginInsert::automation_run (vector<Sample *>& bufs, uint32_t nbufs, nframes_t
|
|||
connect_and_run (bufs, nbufs, nframes, offset, true, now);
|
||||
return;
|
||||
}
|
||||
|
||||
nframes_t buffer_correct = 0;
|
||||
int i;
|
||||
|
||||
|
||||
while (nframes) {
|
||||
nframes_t cnt = min (((nframes_t) ceil (next_event.when) - now), nframes);
|
||||
|
||||
nframes_t cnt = min (((nframes_t) ceil (next_event.when) - now), nframes);
|
||||
|
||||
// This is called first, but nframes = 256
|
||||
connect_and_run (bufs, nbufs, cnt, offset, true, now);
|
||||
|
||||
nframes -= cnt;
|
||||
offset += cnt;
|
||||
now += cnt;
|
||||
buffer_correct += cnt;
|
||||
|
||||
for (i = 0; i < nbufs; i++) {
|
||||
bufs[i] += cnt;
|
||||
}
|
||||
|
||||
if (!find_next_event (now, end, next_event)) {
|
||||
break;
|
||||
|
|
@ -449,6 +458,10 @@ PluginInsert::automation_run (vector<Sample *>& bufs, uint32_t nbufs, nframes_t
|
|||
if (nframes) {
|
||||
connect_and_run (bufs, nbufs, nframes, offset, true, now);
|
||||
}
|
||||
|
||||
for (i = 0; i < nbufs; i++) {
|
||||
bufs[i] -= buffer_correct;
|
||||
}
|
||||
}
|
||||
|
||||
float
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue