Skip to content

Commit

Permalink
Playback: Fixed a problem where inputs wouldn't be muted when recordi…
Browse files Browse the repository at this point in the history
…ng if EngineBehaviour::shouldProcessMutedTracks returns true
  • Loading branch information
drowaudio committed Nov 7, 2024
1 parent 633836f commit 0a801bd
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -1318,5 +1318,4 @@ InputDeviceInstance::Destination* assignTrackAsInput (AudioTrack& destTrack, con
return res ? *res : nullptr;
}


}} // namespace tracktion { inline namespace engine
Original file line number Diff line number Diff line change
Expand Up @@ -1424,6 +1424,15 @@ std::unique_ptr<tracktion::graph::Node> createNodeForAudioTrack (AudioTrack& at,
// When recording, clips should be muted but the plugin should still be audible so use two muting Nodes
node = makeNode<TrackMutingNode> (std::move (clipsMuteState), std::move (node), true);

// If we have any inputs, we need a third muting Node to fully block the clips whilst recording
// The above muting node will still let clips sound if they are going to a aux send, sidechain etc.
if (at.edit.engine.getEngineBehaviour().shouldProcessMutedTracks()
&& ! at.edit.getEditInputDevices().getDevicesForTargetTrack (at).isEmpty())
{
node = makeNode<TrackMutingNode> (std::make_unique<TrackMuteState> (at, true, processMidiWhenMuted),
std::move (node), false);
}

node = createTrackCompNode (at, std::move (node), params);
}

Expand Down

0 comments on commit 0a801bd

Please sign in to comment.