Audacity 3.2.0
LV2Preferences.h
Go to the documentation of this file.
1/**********************************************************************
2
3 Audacity: A Digital Audio Editor
4
5 @file LV2Preferences.h
6 @brief Persistent settings that can apply to any LV2 effect
7
8 Paul Licameli split from LV2Effect.cpp
9
10 Audacity(R) is copyright (c) 1999-2008 Audacity Team.
11 License: GPL v2 or later. See License.txt.
12
13**********************************************************************/
14
15#ifndef __AUDACITY_LV2_PREFERENCES__
16#define __AUDACITY_LV2_PREFERENCES__
17
18#if defined(USE_LV2)
19
20#if defined(__GNUC__)
21#pragma GCC diagnostic ignored "-Wparentheses"
22#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
23#elif defined(__clang__)
24#pragma clang diagnostic ignored "-Wparentheses"
25#pragma clang diagnostic ignored "-Wdeprecated-declarations"
26#endif
27
28#include "../../widgets/wxPanelWrapper.h"
29
31class ShuttleGui;
32
33
34namespace LV2Preferences {
36constexpr auto DEFAULT_BLOCKSIZE = 1048576;
37
41bool GetBufferSize(const EffectDefinitionInterface &effect, int &bufferSize);
42bool SetBufferSize(EffectDefinitionInterface &effect, int bufferSize);
43
44bool GetUseLatency(const EffectDefinitionInterface &effect, bool &useLatency);
45bool SetUseLatency(EffectDefinitionInterface &effect, bool useLatency);
46
47bool GetUseGUI(const EffectDefinitionInterface &effect, bool &useGUI);
48bool SetUseGUI(EffectDefinitionInterface &effect, bool useGUI);
53class Dialog final : public wxDialogWrapper
54{
55public:
56 Dialog(wxWindow *parent, EffectDefinitionInterface &effect);
57 virtual ~Dialog();
58
60
61 void OnOk(wxCommandEvent &evt);
62
63private:
67 bool mUseGUI{};
68
69 DECLARE_EVENT_TABLE()
70};
71}
72
73#endif
74#endif
#define S(N)
Definition: ToChars.cpp:64
EffectDefinitionInterface is a ComponentInterface that adds some basic read-only information about ef...
void OnOk(wxCommandEvent &evt)
Dialog(wxWindow *parent, EffectDefinitionInterface &effect)
EffectDefinitionInterface & mEffect
void PopulateOrExchange(ShuttleGui &S)
Derived from ShuttleGuiBase, an Audacity specific class for shuttling data to and from GUI.
Definition: ShuttleGui.h:628
bool GetUseGUI(const EffectDefinitionInterface &effect, bool &useGUI)
constexpr auto DEFAULT_BLOCKSIZE
Maximum block size in number of samples (not bytes)
bool SetUseLatency(EffectDefinitionInterface &effect, bool useLatency)
bool GetUseLatency(const EffectDefinitionInterface &effect, bool &useLatency)
bool SetBufferSize(EffectDefinitionInterface &effect, int bufferSize)
bool GetBufferSize(const EffectDefinitionInterface &effect, int &bufferSize)
bool SetUseGUI(EffectDefinitionInterface &effect, bool useGUI)