1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-05-03 17:19:43 +02:00

Check for valid lame lib before prompting for metadata.

This commit is contained in:
Leland Lucius 2015-08-27 22:29:02 -05:00
parent e7482c74bd
commit 4e0cb1af71

View File

@ -1557,6 +1557,7 @@ public:
ExportMP3();
void Destroy();
bool CheckFileName(wxFileName & filename, int format);
// Required
@ -1599,6 +1600,21 @@ void ExportMP3::Destroy()
delete this;
}
bool ExportMP3::CheckFileName(wxFileName & WXUNUSED(filename), int WXUNUSED(format))
{
MP3Exporter exporter;
if (!exporter.LoadLibrary(wxTheApp->GetTopWindow(), MP3Exporter::Maybe)) {
wxMessageBox(_("Could not open MP3 encoding library!"));
gPrefs->Write(wxT("/MP3/MP3LibPath"), wxString(wxT("")));
gPrefs->Flush();
return false;
}
return true;
}
int ExportMP3::Export(AudacityProject *project,
int channels,
wxString fName,