Add instrument play handles unconditionally (#6875)

This commit is contained in:
Dominic Clark
2023-09-19 00:18:28 +01:00
committed by GitHub
parent 733e0a1e54
commit dc88040fbe

View File

@@ -701,7 +701,10 @@ void AudioEngine::removeAudioPort(AudioPort * port)
bool AudioEngine::addPlayHandle( PlayHandle* handle )
{
if( criticalXRuns() == false )
// Only add play handles if we have the CPU capacity to process them.
// Instrument play handles are not added during playback, but when the
// associated instrument is created, so add those unconditionally.
if (handle->type() == PlayHandle::Type::InstrumentPlayHandle || !criticalXRuns())
{
m_newPlayHandles.push( handle );
handle->audioPort()->addPlayHandle( handle );