1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-10-26 23:33:49 +01:00

MacroCommands remembers a reference to project...

... Eliminating several GetActiveProject calls, notably including those where
we construct a CommandContext for executing commands.
This commit is contained in:
Paul Licameli
2019-05-21 21:08:43 -04:00
parent f85f4db704
commit c39718fa1f
3 changed files with 18 additions and 15 deletions

View File

@@ -92,7 +92,7 @@ void DoExport( AudacityProject &project, const FileExtension & Format )
FileHistory::Global().AddFileToHistory(filename);
// We're in batch mode, the file does not exist already.
// We really can proceed without prompting.
int nChannels = MacroCommands::IsMono() ? 1 : 2;
int nChannels = MacroCommands::IsMono( &project ) ? 1 : 2;
e.Process(
nChannels, // numChannels,
Format, // type,