diff --git a/src/export/ExportMP3.cpp b/src/export/ExportMP3.cpp index e7b9d33dd..e0eff819a 100644 --- a/src/export/ExportMP3.cpp +++ b/src/export/ExportMP3.cpp @@ -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,