mirror of
https://github.com/cookiengineer/audacity
synced 2025-05-02 00:29:41 +02:00
Fix uses of TrackList::GroupChannels in Mix and effect preview
This commit is contained in:
parent
df1103822e
commit
90e2da7f14
@ -7822,7 +7822,6 @@ void MenuCommandHandler::HandleMixAndRender
|
||||
WaveTrack::Holder uNewLeft, uNewRight;
|
||||
::MixAndRender(
|
||||
tracks, trackFactory, rate, defaultFormat, 0.0, 0.0, uNewLeft, uNewRight);
|
||||
tracks->GroupChannels(*uNewLeft, uNewRight ? 2 : 1);
|
||||
|
||||
if (uNewLeft) {
|
||||
// Remove originals, get stats on what tracks were mixed
|
||||
@ -7845,6 +7844,9 @@ void MenuCommandHandler::HandleMixAndRender
|
||||
if (uNewRight)
|
||||
pNewRight = tracks->Add(std::move(uNewRight));
|
||||
|
||||
// Do this only after adding tracks to the list
|
||||
tracks->GroupChannels(*pNewLeft, pNewRight ? 2 : 1);
|
||||
|
||||
// If we're just rendering (not mixing), keep the track name the same
|
||||
if (selectedCount==1) {
|
||||
pNewLeft->SetName(firstName);
|
||||
|
@ -2537,13 +2537,14 @@ void Effect::Preview(bool dryOnly)
|
||||
mixLeft->Offset(-mixLeft->GetStartTime());
|
||||
mixLeft->SetSelected(true);
|
||||
mixLeft->SetDisplay(WaveTrack::NoDisplay);
|
||||
mTracks->Add(std::move(mixLeft));
|
||||
auto pLeft = mTracks->Add(std::move(mixLeft));
|
||||
Track *pRight{};
|
||||
if (mixRight) {
|
||||
mixRight->Offset(-mixRight->GetStartTime());
|
||||
mixRight->SetSelected(true);
|
||||
mTracks->Add(std::move(mixRight));
|
||||
pRight = mTracks->Add(std::move(mixRight));
|
||||
}
|
||||
mTracks->GroupChannels(*mixLeft, mixRight ? 2 : 1);
|
||||
mTracks->GroupChannels(*pLeft, pRight ? 2 : 1);
|
||||
}
|
||||
else {
|
||||
for (auto src : saveTracks->Any< const WaveTrack >()) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user