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

Bug 1953 - Timer Record: using Custom Mix causes automatic export to be interrupted

This commit is contained in:
Leland Lucius 2020-04-04 03:48:49 -05:00
parent c840133dd8
commit 842b8f792b
2 changed files with 30 additions and 27 deletions

View File

@ -863,7 +863,7 @@ void Exporter::DisplayOptions(int index)
#endif
}
bool Exporter::CheckMix()
bool Exporter::CheckMix(bool prompt /*= true*/ )
{
// Clean up ... should never happen
mMixerSpec.reset();
@ -892,27 +892,29 @@ bool Exporter::CheckMix()
if (exportFormat != wxT("CL") && exportFormat != wxT("FFMPEG") && exportedChannels == -1)
exportedChannels = mChannels;
auto pWindow = ProjectWindow::Find( mProject );
if (exportedChannels == 1) {
if (ShowWarningDialog(pWindow,
wxT("MixMono"),
XO("Your tracks will be mixed down and exported as one mono file."),
true) == wxID_CANCEL)
return false;
}
else if (exportedChannels == 2) {
if (ShowWarningDialog(pWindow,
wxT("MixStereo"),
XO("Your tracks will be mixed down and exported as one stereo file."),
true) == wxID_CANCEL)
return false;
}
else {
if (ShowWarningDialog(pWindow,
wxT("MixUnknownChannels"),
XO("Your tracks will be mixed down to one exported file according to the encoder settings."),
true) == wxID_CANCEL)
return false;
if (prompt) {
auto pWindow = ProjectWindow::Find(mProject);
if (exportedChannels == 1) {
if (ShowWarningDialog(pWindow,
wxT("MixMono"),
XO("Your tracks will be mixed down and exported as one mono file."),
true) == wxID_CANCEL)
return false;
}
else if (exportedChannels == 2) {
if (ShowWarningDialog(pWindow,
wxT("MixStereo"),
XO("Your tracks will be mixed down and exported as one stereo file."),
true) == wxID_CANCEL)
return false;
}
else {
if (ShowWarningDialog(pWindow,
wxT("MixUnknownChannels"),
XO("Your tracks will be mixed down to one exported file according to the encoder settings."),
true) == wxID_CANCEL)
return false;
}
}
}
}
@ -927,9 +929,10 @@ bool Exporter::CheckMix()
NULL,
1,
XO("Advanced Mixing Options"));
if (md.ShowModal() != wxID_OK) {
return false;
if (prompt) {
if (md.ShowModal() != wxID_OK) {
return false;
}
}
mMixerSpec = std::make_unique<MixerSpec>(*(md.GetMixerSpec()));
@ -1096,7 +1099,7 @@ bool Exporter::ProcessFromTimerRecording(bool selectedOnly,
}
// Check for down mixing
if (!CheckMix()) {
if (!CheckMix(false)) {
return false;
}

View File

@ -221,7 +221,7 @@ private:
bool ExamineTracks();
bool GetFilename();
bool CheckFilename();
bool CheckMix();
bool CheckMix(bool prompt = true);
bool ExportTracks();
static void CreateUserPaneCallback(wxWindow *parent, wxUIntPtr userdata);