1
0
mirror of https://github.com/cookiengineer/audacity synced 2026-02-07 20:22:13 +01:00

ExportPlugin::CreateMixer returns a smart pointer

This commit is contained in:
Paul Licameli
2016-03-31 01:33:17 -04:00
parent e6e7b73043
commit ff3e3d0e83
9 changed files with 61 additions and 75 deletions

View File

@@ -480,13 +480,13 @@ int ExportPCM::Export(AudacityProject *project,
const WaveTrackConstArray waveTracks =
tracks->GetWaveTrackConstArray(selectionOnly, false);
Mixer *mixer = CreateMixer(waveTracks,
tracks->GetTimeTrack(),
t0, t1,
info.channels, maxBlockLen, true,
rate, format, true, mixerSpec);
{
auto mixer = CreateMixer(waveTracks,
tracks->GetTimeTrack(),
t0, t1,
info.channels, maxBlockLen, true,
rate, format, true, mixerSpec);
ProgressDialog progress(wxFileName(fName).GetName(),
selectionOnly ?
wxString::Format(_("Exporting the selected audio as %s"),
@@ -515,11 +515,11 @@ int ExportPCM::Export(AudacityProject *project,
sf_error_str(sf, buffer2, 1000);
wxMessageBox(wxString::Format(
/* i18n-hint: %s will be the error message from libsndfile, which
* is usually something unhelpful (and untranslated) like "system
* error" */
_("Error while writing %s file (disk full?).\nLibsndfile says \"%s\""),
formatStr.c_str(),
wxString::FromAscii(buffer2).c_str()));
* is usually something unhelpful (and untranslated) like "system
* error" */
_("Error while writing %s file (disk full?).\nLibsndfile says \"%s\""),
formatStr.c_str(),
wxString::FromAscii(buffer2).c_str()));
break;
}
@@ -527,8 +527,6 @@ int ExportPCM::Export(AudacityProject *project,
}
}
delete mixer;
// Install the WAV metata in a "LIST" chunk at the end of the file
if ((sf_format & SF_FORMAT_TYPEMASK) == SF_FORMAT_WAV ||
(sf_format & SF_FORMAT_TYPEMASK) == SF_FORMAT_WAVEX) {