2#include "../Benchmark.h"
3#include "../commands/CommandDispatch.h"
4#include "../CommonCommandFlags.h"
8#include "../PluginRegistrationDialog.h"
13#include "../ProjectSettings.h"
14#include "../ProjectWindow.h"
15#include "../ProjectWindows.h"
16#include "../ProjectSelectionManager.h"
20#include "../toolbars/ToolManager.h"
21#include "../toolbars/SelectionBar.h"
22#include "../TrackPanelAx.h"
25#include "../commands/CommandContext.h"
26#include "../commands/CommandManager.h"
27#include "../effects/EffectManager.h"
28#include "../effects/EffectUI.h"
30#include "../prefs/PrefsDialog.h"
43 return dlg.ShowModal() == wxID_OK;
60 else if (
auto pTrack =
dynamic_cast<SampleTrack *
>(trackFocus.Get()))
61 panel.ShowPanel(pTrack,
true);
77 menuManager.mLastGenerator =
"";
78 menuManager.mLastEffect =
"";
79 menuManager.mLastAnalyzer =
"";
80 menuManager.mLastTool =
"";
153 auto lastEffect = menuManager.mLastGenerator;
154 if (!lastEffect.empty())
164 auto lastEffect = menuManager.mLastEffect;
165 if (!lastEffect.empty())
168 lastEffect, context, menuManager.mRepeatEffectFlags);
175 switch (menuManager.mLastAnalyzerRegistration) {
178 auto lastEffect = menuManager.mLastAnalyzer;
179 if (!lastEffect.empty())
182 lastEffect, context, menuManager.mRepeatAnalyzerFlags);
188 menuManager.mLastAnalyzerRegisteredId);
219 bool &setting = gAudioIO->mSimulateRecordingErrors;
220 commandManager.Check(
wxT(
"SimulateRecordingErrors"), !setting);
230 auto &setting = gAudioIO->mDetectUpstreamDropouts;
231 auto oldValue = setting.load(std::memory_order_relaxed);
232 commandManager.Check(
wxT(
"DetectUpstreamDropouts"), !oldValue);
233 setting.store(!oldValue, std::memory_order_relaxed);
241 XO(
"A journal will be recorded after Audacity restarts.");
245 XO(
"No journal will be recorded after Audacity restarts.");
292 if (!lastGenerator.empty())
293 buildMenuLabel =
XO(
"Repeat %s")
296 buildMenuLabel =
XO(
"Repeat Last Generator");
298 return Command(
wxT(
"RepeatLastGenerator"), buildMenuLabel,
309 auto result =
Items(
"");
347 return (trackFocus.Get() !=
nullptr);
366 Command (
wxT(
"AddRealtimeEffects"),
XXO(
"Add Realtime Effects"),
376 if (!lastEffect.empty())
377 buildMenuLabel =
XO(
"Repeat %s")
380 buildMenuLabel =
XO(
"Repeat Last Effect");
382 return Command(
wxT(
"RepeatLastEffect"), buildMenuLabel,
393 auto result =
Items(
"");
441 if (!lastAnalyzer.empty())
442 buildMenuLabel =
XO(
"Repeat %s")
445 buildMenuLabel =
XO(
"Repeat Last Analyzer");
447 return Command(
wxT(
"RepeatLastAnalyzer"), buildMenuLabel,
460 auto result =
Items(
"");
510 auto result =
Items(
"");
525 XXO(
"Simulate Recording Errors"),
532 XXO(
"Detect Upstream Dropouts"),
538 .load(std::memory_order_relaxed); } ) )
542#
if defined(IS_ALPHA) || defined(END_USER_JOURNALLING)
548 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")
audacity::BasicSettings * gPrefs
void ResetPreferences()
Call this to reset preferences to an (almost)-"new" default state.
#define AUDACITY_PREFS_VERSION_STRING
void DoReloadPreferences(AudacityProject &project)
an object holding per-project preferred sample rate
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 ...
IntSetting SelectionToolbarMode
StringSetting SnapToSetting
EnumSetting< SnapMode > SnapModeSetting
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()
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()
static ProjectRate & Get(AudacityProject &project)
void SetRate(double rate)
void SetSnapMode(SnapMode mode)
void SetSnapTo(Identifier snap)
static ProjectSnap & Get(AudacityProject &project)
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.
bool Read(T *pVar) const
overload of Read returning a boolean that is true if the value was previously defined */
Holds a msgid for the translation catalog; may also bind format arguments.
virtual bool Flush() noexcept=0
double ReadDouble(const wxString &key, double defaultValue) const
virtual bool Write(const wxString &key, bool value)=0
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::unique_ptr< detail::IndirectItem< Item > > Indirect(const std::shared_ptr< Item > &ptr)
A convenience function.
std::shared_ptr< BaseItem > BaseItemSharedPtr
FILES_API const FilePath & DefaultTempDir()
CommandManager::Options Options
Options && CheckTest(const CheckFn &fn) &&