diff --git a/src/BatchCommands.cpp b/src/BatchCommands.cpp index 909c699a1..eac1a57ea 100644 --- a/src/BatchCommands.cpp +++ b/src/BatchCommands.cpp @@ -575,9 +575,12 @@ bool MacroCommands::WriteMp3File( const wxString & Name, int bitrate ) bool rc; long prevBitRate = gPrefs->Read(wxT("/FileFormats/MP3Bitrate"), 128); gPrefs->Write(wxT("/FileFormats/MP3Bitrate"), bitrate); + int prevMode = gPrefs->Read(wxT("/FileFormats/MP3RateMode"), MODE_CBR); + gPrefs->Write(wxT("/FileFormats/MP3RateMode"), MODE_CBR); auto cleanup = finally( [&] { gPrefs->Write(wxT("/FileFormats/MP3Bitrate"), prevBitRate); + gPrefs->Write(wxT("/FileFormats/MP3RateMode"), prevMode); gPrefs->Flush(); } ); @@ -643,10 +646,18 @@ bool MacroCommands::ApplySpecialCommand( // historically this was in use, now ignored if there return true; } else if (command == wxT("ExportMP3_56k_before")) { +#if defined(__WXMSW__) + filename.Replace(wxT("cleaned\\"), wxT("cleaned\\MasterBefore_"), false); +#else filename.Replace(wxT("cleaned/"), wxT("cleaned/MasterBefore_"), false); +#endif return WriteMp3File(filename, 56); } else if (command == wxT("ExportMP3_56k_after")) { +#if defined(__WXMSW__) + filename.Replace(wxT("cleaned\\"), wxT("cleaned\\MasterAfter_"), false); +#else filename.Replace(wxT("cleaned/"), wxT("cleaned/MasterAfter_"), false); +#endif return WriteMp3File(filename, 56); } else if (command == wxT("ExportMP3")) { return WriteMp3File(filename, 0); // 0 bitrate means use default/current diff --git a/src/export/ExportMP3.cpp b/src/export/ExportMP3.cpp index 9d5762aae..d881e3c6e 100644 --- a/src/export/ExportMP3.cpp +++ b/src/export/ExportMP3.cpp @@ -105,11 +105,6 @@ // ExportMP3Options //---------------------------------------------------------------------------- -#define MODE_SET 0 -#define MODE_VBR 1 -#define MODE_ABR 2 -#define MODE_CBR 3 - #define CHANNEL_JOINT 0 #define CHANNEL_STEREO 1 #define CHANNEL_MONO 2 diff --git a/src/export/ExportMP3.h b/src/export/ExportMP3.h index f7bba5e22..d1691c7c9 100644 --- a/src/export/ExportMP3.h +++ b/src/export/ExportMP3.h @@ -14,6 +14,12 @@ /* --------------------------------------------------------------------------*/ #include "../MemoryX.h" + +#define MODE_SET 0 +#define MODE_VBR 1 +#define MODE_ABR 2 +#define MODE_CBR 3 + class ExportPlugin; class wxString; class wxWindow;