Fix crash on MIDI bounce w/processing

Bounce (Session::write_one_track) uses bounce_chunk_size = 8192
to process data. This requires gain_automation_buffer, and
scratch buffers that can hold 8k samples.

Previously the buffers were not allocated when bounding MIDI
(no synth), leading to a crash when automation was used.
This commit is contained in:
Robin Gareus 2021-06-12 01:17:51 +02:00
parent 76f30fe74e
commit 1c4323e32f
Signed by: rgareus
GPG Key ID: A090BCE02CF57F04

View File

@ -46,7 +46,7 @@ ThreadBuffers::ThreadBuffers ()
void
ThreadBuffers::ensure_buffers (ChanCount howmany, size_t custom)
{
// std::cerr << "ThreadBuffers " << this << " resize buffers with count = " << howmany << std::endl;
// std::cerr << "ThreadBuffers " << this << " resize buffers with count = " << howmany << " size = " << custom << std::endl;
/* this is all protected by the process lock in the Session */
@ -55,10 +55,6 @@ ThreadBuffers::ensure_buffers (ChanCount howmany, size_t custom)
howmany.set_midi (1);
}
if (howmany.n_audio () == 0 && howmany.n_midi () == 1) {
return;
}
AudioEngine* _engine = AudioEngine::instance ();
for (DataType::iterator t = DataType::begin (); t != DataType::end (); ++t) {