1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-10-15 07:01:18 +02:00

Remove SetLinked() and SetChannel() from importers

This commit is contained in:
Paul Licameli
2018-09-19 14:13:24 -04:00
parent 7e6a543473
commit 894f6f4f63
9 changed files with 13 additions and 125 deletions

View File

@@ -367,26 +367,9 @@ ProgressResult PCMImportFileHandle::Import(TrackFactory *trackFactory,
NewChannelGroup channels(mInfo.channels);
auto iter = channels.begin();
for (int c = 0; c < mInfo.channels; ++iter, ++c) {
for (int c = 0; c < mInfo.channels; ++iter, ++c)
*iter = trackFactory->NewWaveTrack(mFormat, mInfo.samplerate);
if (mInfo.channels > 1)
switch (c) {
case 0:
iter->get()->SetChannel(Track::LeftChannel);
break;
case 1:
iter->get()->SetChannel(Track::RightChannel);
break;
default:
iter->get()->SetChannel(Track::MonoChannel);
}
}
if (mInfo.channels == 2) {
channels.begin()->get()->SetLinked(true);
}
auto fileTotalFrames =
(sampleCount)mInfo.frames; // convert from sf_count_t
auto maxBlockSize = channels.begin()->get()->GetMaxBlockSize();