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:
@@ -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;
|
||||
|
||||
|
Reference in New Issue
Block a user