Audacity 3.2.0
QualityPrefs.cpp
Go to the documentation of this file.
1/**********************************************************************
2
3 Audacity: A Digital Audio Editor
4
5 QualityPrefs.cpp
6
7 Joshua Haberman
8 James Crook
9
10
11*******************************************************************//*******************************************************************/
17
18
19#include "QualityPrefs.h"
20#include "QualitySettings.h"
21
22#include <wx/choice.h>
23#include <wx/defs.h>
24#include <wx/textctrl.h>
25
26#include "AudioIOBase.h"
27#include "Dither.h"
28#include "Prefs.h"
29#include "Resample.h"
30#include "ShuttleGui.h"
31
33BEGIN_EVENT_TABLE(QualityPrefs, PrefsPanel)
35
36QualityPrefs::QualityPrefs(wxWindow * parent, wxWindowID winid)
37/* i18n-hint: meaning accuracy in reproduction of sounds */
38: PrefsPanel(parent, winid, XO("Quality"))
39{
40 Populate();
41}
42
44{
45}
46
48{
50}
51
53{
54 return XO("Preferences for Quality");
55}
56
58{
59 return "Quality_Preferences";
60}
61
63{
64 //------------------------- Main section --------------------
65 // Now construct the GUI itself.
66 // Use 'eIsCreatingFromPrefs' so that the GUI is
67 // initialised with values from gPrefs.
70 // ----------------------- End of main section --------------
71}
72
74{
75 S.SetBorder(2);
76 S.StartScroller();
77
78 S.StartStatic(XO("Real-time Conversion"));
79 {
80 S.StartMultiColumn(2, wxEXPAND);
81 {
82 S.TieChoice(XXO("Sample Rate Con&verter:"),
84
85 /* i18n-hint: technical term for randomization to reduce undesirable resampling artifacts */
86 S.TieChoice(XXO("&Dither:"),
88 }
89 S.EndMultiColumn();
90 }
91 S.EndStatic();
92
93 S.StartStatic(XO("High-quality Conversion"));
94 {
95 S.StartMultiColumn(2);
96 {
97 S.TieChoice(XXO("Sample Rate Conver&ter:"),
99
100 /* i18n-hint: technical term for randomization to reduce undesirable resampling artifacts */
101 S.TieChoice(XXO("Dit&her:"),
103 }
104 S.EndMultiColumn();
105 }
106 S.EndStatic();
107 S.EndScroller();
108
109}
110
112{
115
116 // Tell CopySamples() to use these ditherers now
118
119 return true;
120}
121
122namespace{
124 [](wxWindow *parent, wxWindowID winid, AudacityProject *)
125 {
126 wxASSERT(parent); // to justify safenew
127 return safenew QualityPrefs(parent, winid);
128 }
129};
130}
131
END_EVENT_TABLE()
XO("Cut/Copy/Paste")
XXO("&Cut/Copy/Paste Toolbar")
#define safenew
Definition: MemoryX.h:10
#define QUALITY_PREFS_PLUGIN_SYMBOL
Definition: QualityPrefs.h:24
void InitDitherers()
@ eIsCreatingFromPrefs
Definition: ShuttleGui.h:46
@ eIsSavingToPrefs
Definition: ShuttleGui.h:47
#define S(N)
Definition: ToChars.cpp:64
The top-level handle to an Audacity project. It serves as a source of events that other objects can b...
Definition: Project.h:90
ComponentInterfaceSymbol pairs a persistent string identifier used internally with an optional,...
static EnumSetting< DitherType > BestSetting
Definition: Dither.h:29
static EnumSetting< DitherType > FastSetting
Definition: Dither.h:28
Base class for a panel in the PrefsDialog. Classes derived from this class include BatchPrefs,...
Definition: PrefsPanel.h:51
A PrefsPanel used for setting audio quality.
Definition: QualityPrefs.h:27
bool Commit() override
ManualPageID HelpPageName() override
If not empty string, the Help button is added below the panel.
void PopulateOrExchange(ShuttleGui &S) override
ComponentInterfaceSymbol GetSymbol() const override
virtual ~QualityPrefs()
TranslatableString GetDescription() const override
static EnumSetting< int > FastMethodSetting
Definition: Resample.h:48
static EnumSetting< int > BestMethodSetting
Definition: Resample.h:49
Derived from ShuttleGuiBase, an Audacity specific class for shuttling data to and from GUI.
Definition: ShuttleGui.h:640
Holds a msgid for the translation catalog; may also bind format arguments.
PrefsPanel::Registration sAttachment