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

Bug 2195: Treat multi-channel import / recording as multiple mono

This commit is contained in:
SteveDaulton
2020-03-09 12:57:17 +00:00
parent efc8f216b1
commit 3ea2b82dbc

View File

@@ -710,8 +710,7 @@ Track *TrackList::DoAdd(const std::shared_ptr<Track> &t)
void TrackList::GroupChannels(
Track &track, size_t groupSize, bool resetChannels )
{
// If group size is more than two, for now only the first two channels
// are grouped as stereo, and any others remain mono
// If group size is exactly two, group as stereo, else mono (bug 2195).
auto list = track.mList.lock();
if ( groupSize > 0 && list.get() == this ) {
auto iter = track.mNode.first;
@@ -745,9 +744,9 @@ void TrackList::GroupChannels(
if ( groupSize > 1 ) {
const auto channel = *iter++;
channel->SetLinked( true );
channel->SetChannel( Track::LeftChannel );
(*iter++)->SetChannel( Track::RightChannel );
channel->SetLinked( groupSize == 2 );
channel->SetChannel( groupSize == 2? Track::LeftChannel : Track::MonoChannel );
(*iter++)->SetChannel( groupSize == 2? Track::RightChannel : Track::MonoChannel );
while (iter != after)
(*iter++)->SetChannel( Track::MonoChannel );
}