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

Construct Exporter with project pointer, fewer GetActiveProject calls

This commit is contained in:
Paul Licameli
2019-05-21 20:16:20 -04:00
parent ece7bd888d
commit d23569ca10
13 changed files with 50 additions and 51 deletions

View File

@@ -697,7 +697,7 @@ bool ProjectFileManager::SaveCopyWaveTracks(const FilePath & strProjectPathName,
// Export all WaveTracks to OGG.
bool bSuccess = true;
Exporter theExporter;
Exporter theExporter{ project };
wxFileName uniqueTrackFileName;
for (auto pTrack : (trackRange + &Track::IsLeader))
{
@@ -711,7 +711,7 @@ bool ProjectFileManager::SaveCopyWaveTracks(const FilePath & strProjectPathName,
const auto startTime = channels.min( &Track::GetStartTime );
const auto endTime = channels.max( &Track::GetEndTime );
bSuccess =
theExporter.Process(&project, channels.size(),
theExporter.Process(channels.size(),
fileFormat, uniqueTrackFileName.GetFullPath(), true,
startTime, endTime);