Clearing inputs from one track will clear same inputs from all tracks

Hi, I expected this function to just clear the inputs for the given track, but it seems to actually remove the inputs from all tracks. Is this intended for some reason?

void EditInputDevices::clearAllInputs (const AudioTrack& at)
{
    for (auto* idi : getDevicesForTargetTrack (at))
        idi->clearFromTracks();
}

I would have expected it to just go like this (which would require removing const, though…):

void EditInputDevices::clearAllInputs (AudioTrack& at)
{
    for (auto* idi : getDevicesForTargetTrack (at))
        idi->removeTargetTrack (at);
}

Yes that looks correct, thanks.

1 Like