4#include "../Benchmark.h"
5#include "../commands/CommandDispatch.h"
6#include "../CommonCommandFlags.h"
10#include "../PluginRegistrationDialog.h"
13#include "../ProjectSettings.h"
14#include "../ProjectWindow.h"
15#include "../ProjectWindows.h"
16#include "../ProjectSelectionManager.h"
19#include "../toolbars/ToolManager.h"
20#include "../TrackPanelAx.h"
23#include "../commands/CommandContext.h"
24#include "../commands/CommandManager.h"
25#include "../effects/EffectManager.h"
26#include "../effects/EffectUI.h"
28#include "../prefs/PrefsDialog.h"
41 return dlg.ShowModal() == wxID_OK;
59 panel.ShowPanel(trackFocus.Get(),
true);
71 auto &project = context.
project;
75 menuManager.mLastGenerator =
"";
76 menuManager.mLastEffect =
"";
77 menuManager.mLastAnalyzer =
"";
78 menuManager.mLastTool =
"";
96 gPrefs->Write(
"/SelectionToolbarMode", 0);
109 gPrefs->Write(
wxT(
"/Version/Major"), AUDACITY_VERSION);
110 gPrefs->Write(
wxT(
"/Version/Minor"), AUDACITY_RELEASE);
111 gPrefs->Write(
wxT(
"/Version/Micro"), AUDACITY_REVISION);
123 auto &project = context.
project;
135 auto &project = context.
project;
141 auto& project = context.
project;
150 auto lastEffect = menuManager.mLastGenerator;
151 if (!lastEffect.empty())
161 auto lastEffect = menuManager.mLastEffect;
162 if (!lastEffect.empty())
165 lastEffect, context, menuManager.mRepeatEffectFlags);
172 switch (menuManager.mLastAnalyzerRegistration) {
175 auto lastEffect = menuManager.mLastAnalyzer;
176 if (!lastEffect.empty())
179 lastEffect, context, menuManager.mRepeatAnalyzerFlags);
185 menuManager.mLastAnalyzerRegisteredId);
192 auto &project = context.
project;
198 auto &project = context.
project;
204 auto &project = context.
project;
212 auto &project = context.
project;
216 bool &setting = gAudioIO->mSimulateRecordingErrors;
217 commandManager.Check(
wxT(
"SimulateRecordingErrors"), !setting);
223 auto &project = context.
project;
227 auto &setting = gAudioIO->mDetectUpstreamDropouts;
228 auto oldValue = setting.load(std::memory_order_relaxed);
229 commandManager.Check(
wxT(
"DetectUpstreamDropouts"), !oldValue);
230 setting.store(!oldValue, std::memory_order_relaxed);
238 XO(
"A journal will be recorded after Audacity restarts.");
242 XO(
"No journal will be recorded after Audacity restarts.");
289 if (!lastGenerator.empty())
290 buildMenuLabel =
XO(
"Repeat %s")
293 buildMenuLabel =
XO(
"Repeat Last Generator");
295 return Command(
wxT(
"RepeatLastGenerator"), buildMenuLabel,
341 return (trackFocus.Get() !=
nullptr);
360 Command (
wxT(
"AddRealtimeEffects"),
XXO(
"Add Realtime Effects"),
370 if (!lastEffect.empty())
371 buildMenuLabel =
XO(
"Repeat %s")
374 buildMenuLabel =
XO(
"Repeat Last Effect");
376 return Command(
wxT(
"RepeatLastEffect"), buildMenuLabel,
432 if (!lastAnalyzer.empty())
433 buildMenuLabel =
XO(
"Repeat %s")
436 buildMenuLabel =
XO(
"Repeat Last Analyzer");
438 return Command(
wxT(
"RepeatLastAnalyzer"), buildMenuLabel,
510 XXO(
"Simulate Recording Errors"),
517 XXO(
"Detect Upstream Dropouts"),
523 .load(std::memory_order_relaxed); } ) )
527#
if defined(IS_ALPHA) || defined(END_USER_JOURNALLING)
533 XXO(
"Write Journal"),
int AudacityMessageBox(const TranslatableString &message, const TranslatableString &caption, long style, wxWindow *parent, int x, int y)
BoolSetting SoundActivatedRecord
AttachedItem sAttachment1
AttachedItem sAttachment3
AttachedItem sAttachment2
void RunBenchmark(wxWindow *parent, AudacityProject &project)
constexpr CommandFlag AlwaysEnabledFlag
const ReservedCommandFlag & AudioIONotBusyFlag()
const ReservedCommandFlag & TimeSelectedFlag()
const ReservedCommandFlag & WaveTracksSelectedFlag()
ChoiceSetting EffectsGroupBy
XXO("&Cut/Copy/Paste Toolbar")
void ResetPreferences()
Call this to reset preferences to an (almost)-"new" default state.
#define AUDACITY_PREFS_VERSION_STRING
void DoReloadPreferences(AudacityProject &project)
AUDACITY_DLL_API wxFrame & GetProjectFrame(AudacityProject &project)
Get the top-level window associated with the project (as a wxFrame only, when you do not need to use ...
BoolSetting SyncLockTracks
The top-level handle to an Audacity project. It serves as a source of events that other objects can b...
bool mSimulateRecordingErrors
std::atomic< bool > mDetectUpstreamDropouts
CommandContext provides additional information to an 'Apply()' command. It provides the project,...
CommandParameter parameter
AudacityProject & project
void RegisterLastTool(const CommandContext &context)
void DoRepeatProcess(const CommandContext &context, int)
static CommandManager & Get(AudacityProject &project)
static EffectManager & Get()
virtual bool Flush(bool bCurrentOnly=false) wxOVERRIDE
const wxString & GET() const
Explicit conversion to wxString, meant to be ugly-looking and demanding of a comment why it's correct...
PluginManager maintains a list of all plug ins. That covers modules, effects, generators,...
static PluginManager & Get()
void AS_SetSnapTo(int snap) override
static ProjectSelectionManager & Get(AudacityProject &project)
void AS_SetRate(double rate) override
static void OnResetWindow(const CommandContext &context)
static RealtimeEffectManager & Get(AudacityProject &project)
bool IsActive() const noexcept
To be called only from main thread.
static RealtimeEffectPanel & Get(AudacityProject &project)
bool Reset()
Reset to the default value.
Holds a msgid for the translation catalog; may also bind format arguments.
AUDACITY_DLL_API bool DoEffect(const PluginID &ID, const CommandContext &context, unsigned flags)
'Repeat Last Effect'.
FILES_API void UpdateDefaultPath(Operation op, const FilePath &path)
Facilities for recording and playback of sequences of user interaction.
bool SetRecordEnabled(bool value)
std::shared_ptr< BaseItem > BaseItemSharedPtr
FILES_API const FilePath & DefaultTempDir()
CommandManager::Options Options
Options && CheckTest(const CheckFn &fn) &&