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

Bug 1600: Should keep progress dialog visible throughout Exp. Multi

This commit is contained in:
Paul Licameli
2018-01-25 15:58:37 -05:00
parent f5737be02c
commit d4b21bb33e
13 changed files with 124 additions and 58 deletions

View File

@@ -174,6 +174,7 @@ public:
wxWindow *OptionsCreate(wxWindow *parent, int format) override;
ProgressResult Export(AudacityProject *project,
std::unique_ptr<ProgressDialog> &pDialog,
unsigned channels,
const wxString &fName,
bool selectedOnly,
@@ -204,6 +205,7 @@ ExportMP2::ExportMP2()
}
ProgressResult ExportMP2::Export(AudacityProject *project,
std::unique_ptr<ProgressDialog> &pDialog,
unsigned channels, const wxString &fName,
bool selectionOnly, double t0, double t1, MixerSpec *mixerSpec, const Tags *metadata,
int WXUNUSED(subformat))
@@ -272,10 +274,13 @@ ProgressResult ExportMP2::Export(AudacityProject *project,
stereo ? 2 : 1, pcmBufferSize, true,
rate, int16Sample, true, mixerSpec);
ProgressDialog progress(wxFileName(fName).GetName(),
selectionOnly ?
wxString::Format(_("Exporting selected audio at %ld kbps"), bitrate) :
wxString::Format(_("Exporting the audio at %ld kbps"), bitrate));
InitProgress( pDialog, wxFileName(fName).GetName(),
selectionOnly
? wxString::Format(_("Exporting selected audio at %ld kbps"),
bitrate)
: wxString::Format(_("Exporting the audio at %ld kbps"),
bitrate) );
auto &progress = *pDialog;
while (updateResult == ProgressResult::Success) {
auto pcmNumSamples = mixer->Process(pcmBufferSize);