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

Importer functions return a vector of vector of pointers to tracks...

... grouping the channels; rather than one flat vector.

OGG, GStreamer and FFmpeg import were written to allow multiple multi-channel
tracks; others always imported one group of channels.

All of that is reflected in the results returned by the importers, though it
makes no difference yet in AudacityProject::AddImportedTracks (where the
results are used).
This commit is contained in:
Paul Licameli
2018-09-19 11:47:50 -04:00
parent b0c5f42b9a
commit 31d46ae624
15 changed files with 70 additions and 61 deletions

View File

@@ -364,7 +364,7 @@ ProgressResult PCMImportFileHandle::Import(TrackFactory *trackFactory,
CreateProgress();
TrackHolders channels(mInfo.channels);
NewChannelGroup channels(mInfo.channels);
auto iter = channels.begin();
for (int c = 0; c < mInfo.channels; ++iter, ++c) {
@@ -529,10 +529,11 @@ ProgressResult PCMImportFileHandle::Import(TrackFactory *trackFactory,
return updateResult;
}
for(const auto &channel : channels) {
for(const auto &channel : channels)
channel->Flush();
}
outTracks.swap(channels);
if (!channels.empty())
outTracks.push_back(std::move(channels));
const char *str;