mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-10 16:46:35 +01:00
fix crashes for plugin using maxBlockLength during latency compute.
This commit is contained in:
parent
ce818efe37
commit
118adc286b
1 changed files with 4 additions and 2 deletions
|
|
@ -1895,8 +1895,9 @@ LV2Plugin::latency_compute_run()
|
||||||
uint32_t in_index = 0;
|
uint32_t in_index = 0;
|
||||||
uint32_t out_index = 0;
|
uint32_t out_index = 0;
|
||||||
|
|
||||||
const framecnt_t bufsize = 1024;
|
// this is done in the main thread. non realtime.
|
||||||
float buffer[bufsize];
|
const framecnt_t bufsize = _engine.samples_per_cycle();
|
||||||
|
float *buffer = (float*) malloc(_engine.samples_per_cycle() * sizeof(float));
|
||||||
|
|
||||||
memset(buffer, 0, sizeof(float) * bufsize);
|
memset(buffer, 0, sizeof(float) * bufsize);
|
||||||
|
|
||||||
|
|
@ -1922,6 +1923,7 @@ LV2Plugin::latency_compute_run()
|
||||||
if (was_activated) {
|
if (was_activated) {
|
||||||
activate();
|
activate();
|
||||||
}
|
}
|
||||||
|
free(buffer);
|
||||||
}
|
}
|
||||||
|
|
||||||
const LilvPort*
|
const LilvPort*
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue