1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-10-16 15:41:11 +02:00

Mixer::WarpOptions constructor for common case

This commit is contained in:
Paul Licameli
2020-11-30 13:41:10 -05:00
parent 9d6dd45973
commit 4871584cb3
6 changed files with 22 additions and 17 deletions

View File

@@ -59,7 +59,6 @@
#include "../ProjectWindow.h"
#include "../ShuttleGui.h"
#include "../Tags.h"
#include "../TimeTrack.h"
#include "../WaveTrack.h"
#include "../widgets/AudacityMessageBox.h"
#include "../widgets/Warning.h"
@@ -234,13 +233,11 @@ std::unique_ptr<Mixer> ExportPlugin::CreateMixer(const TrackList &tracks,
for (auto pTrack: range)
inputTracks.push_back(
pTrack->SharedPointer< const WaveTrack >() );
const auto timeTrack = *tracks.Any<const TimeTrack>().begin();
auto envelope = timeTrack ? timeTrack->GetEnvelope() : nullptr;
// MB: the stop time should not be warped, this was a bug.
return std::make_unique<Mixer>(inputTracks,
// Throw, to stop exporting, if read fails:
true,
Mixer::WarpOptions(envelope),
Mixer::WarpOptions{tracks},
startTime, stopTime,
numOutChannels, outBufferSize, outInterleaved,
outRate, outFormat,