Skip to content

Commit

Permalink
Add instrument play handles unconditionally (#6875)
Browse files Browse the repository at this point in the history
  • Loading branch information
DomClark authored Sep 18, 2023
1 parent 733e0a1 commit dc88040
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/core/AudioEngine.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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 );
Expand Down

0 comments on commit dc88040

Please sign in to comment.