1
0
mirror of https://github.com/cookiengineer/audacity synced 2026-02-05 03:03:10 +01:00

Remove more uses of Track::SetLinked() and Track::SetChannel()

This commit is contained in:
Paul Licameli
2018-09-20 10:44:51 -04:00
parent 894f6f4f63
commit beebe648fb
6 changed files with 46 additions and 76 deletions

View File

@@ -120,10 +120,7 @@ void MixAndRender(TrackList *tracks, TrackFactory *trackFactory,
// TODO: more-than-two-channels
decltype(mixLeft) mixRight{};
if (mono) {
mixLeft->SetChannel(Track::MonoChannel);
}
else {
if ( !mono ) {
mixRight = trackFactory->NewWaveTrack(format, rate);
if (oneinput) {
auto channels = TrackList::Channels(first);
@@ -134,14 +131,10 @@ void MixAndRender(TrackList *tracks, TrackFactory *trackFactory,
}
else
mixRight->SetName(_("Mix"));
mixLeft->SetChannel(Track::LeftChannel);
mixRight->SetChannel(Track::RightChannel);
mixRight->SetOffset(mixStartTime);
mixLeft->SetLinked(true);
}
auto maxBlockLen = mixLeft->GetIdealBlockSize();
// If the caller didn't specify a time range, use the whole range in which