mirror of
https://github.com/cookiengineer/audacity
synced 2025-07-06 23:47:45 +02:00
Remove old CleanSpeech macro commands
This commit is contained in:
parent
f43ad3f0e0
commit
17b4919a2a
@ -42,9 +42,7 @@
|
|||||||
// private helper classes and functions
|
// private helper classes and functions
|
||||||
namespace {
|
namespace {
|
||||||
|
|
||||||
void DoExport(AudacityProject &project,
|
void DoExport(AudacityProject &project, const FileExtension &format)
|
||||||
const FileExtension &format,
|
|
||||||
const wxString &prefix = {})
|
|
||||||
{
|
{
|
||||||
auto &tracks = TrackList::Get( project );
|
auto &tracks = TrackList::Get( project );
|
||||||
auto &projectFileIO = ProjectFileIO::Get( project );
|
auto &projectFileIO = ProjectFileIO::Get( project );
|
||||||
@ -74,9 +72,7 @@ void DoExport(AudacityProject &project,
|
|||||||
FilePath pathName = !projectFileIO.IsTemporary() ?
|
FilePath pathName = !projectFileIO.IsTemporary() ?
|
||||||
wxPathOnly(projectFileIO.GetFileName()) :
|
wxPathOnly(projectFileIO.GetFileName()) :
|
||||||
project.GetInitialImportPath();
|
project.GetInitialImportPath();
|
||||||
wxFileName fileName(pathName,
|
wxFileName fileName(pathName, projectName, format.Lower());
|
||||||
prefix + projectName,
|
|
||||||
format.Lower());
|
|
||||||
|
|
||||||
// Append the "macro-output" directory to the path
|
// Append the "macro-output" directory to the path
|
||||||
const wxString macroDir( "macro-output" );
|
const wxString macroDir( "macro-output" );
|
||||||
@ -116,20 +112,6 @@ void DoExport(AudacityProject &project,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void WriteMp3File(AudacityProject &project, const wxString &prefix)
|
|
||||||
{
|
|
||||||
long prevBitRate = gPrefs->Read(wxT("/FileFormats/MP3Bitrate"), 128);
|
|
||||||
gPrefs->Write(wxT("/FileFormats/MP3Bitrate"), 56);
|
|
||||||
auto prevMode = MP3RateModeSetting.ReadEnum();
|
|
||||||
MP3RateModeSetting.WriteEnum(MODE_CBR);
|
|
||||||
|
|
||||||
DoExport(project, wxT("MP3"), prefix);
|
|
||||||
|
|
||||||
gPrefs->Write(wxT("/FileFormats/MP3Bitrate"), prevBitRate);
|
|
||||||
MP3RateModeSetting.WriteEnum(prevMode);
|
|
||||||
gPrefs->Flush();
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Compact dialog
|
// Compact dialog
|
||||||
@ -651,16 +633,6 @@ void OnExit(const CommandContext &WXUNUSED(context) )
|
|||||||
wxTheApp->AddPendingEvent( evt );
|
wxTheApp->AddPendingEvent( evt );
|
||||||
}
|
}
|
||||||
|
|
||||||
void OnExportMP3_56k_before(const CommandContext &context)
|
|
||||||
{
|
|
||||||
WriteMp3File(context.project, wxT("MasterBefore_"));
|
|
||||||
}
|
|
||||||
|
|
||||||
void OnExportMP3_56k_after(const CommandContext &context)
|
|
||||||
{
|
|
||||||
WriteMp3File(context.project, wxT("MasterAfter_"));
|
|
||||||
}
|
|
||||||
|
|
||||||
void OnExportFLAC(const CommandContext &context)
|
void OnExportFLAC(const CommandContext &context)
|
||||||
{
|
{
|
||||||
DoExport(context.project, "FLAC");
|
DoExport(context.project, "FLAC");
|
||||||
@ -850,12 +822,6 @@ BaseItemSharedPtr HiddenFileMenu()
|
|||||||
return false;
|
return false;
|
||||||
},
|
},
|
||||||
Menu( wxT("HiddenFileMenu"), XXO("Hidden File Menu"),
|
Menu( wxT("HiddenFileMenu"), XXO("Hidden File Menu"),
|
||||||
Command( wxT("ExportMP3_56k_before"), XXO("Export as MP3 56k before"),
|
|
||||||
FN(OnExportMP3_56k_before),
|
|
||||||
AudioIONotBusyFlag() ),
|
|
||||||
Command( wxT("ExportMP3_56k_after"), XXO("Export as MP3 56k after"),
|
|
||||||
FN(OnExportMP3_56k_after),
|
|
||||||
AudioIONotBusyFlag() ),
|
|
||||||
Command( wxT("ExportFLAC"), XXO("Export as FLAC"),
|
Command( wxT("ExportFLAC"), XXO("Export as FLAC"),
|
||||||
FN(OnExportFLAC),
|
FN(OnExportFLAC),
|
||||||
AudioIONotBusyFlag() )
|
AudioIONotBusyFlag() )
|
||||||
|
Loading…
x
Reference in New Issue
Block a user