|
1 | 1 | /*
|
2 | 2 | * Copyright 2006 Milan Digital Audio LLC
|
3 |
| - * Copyright 2009-2024 GrandOrgue contributors (see AUTHORS) |
| 3 | + * Copyright 2009-2025 GrandOrgue contributors (see AUTHORS) |
4 | 4 | * License GPL-2.0 or later
|
5 | 5 | * (https://www.gnu.org/licenses/old-licenses/gpl-2.0.html).
|
6 | 6 | */
|
|
32 | 32 | #include "sound/ports/GOSoundPort.h"
|
33 | 33 | #include "sound/ports/GOSoundPortFactory.h"
|
34 | 34 |
|
| 35 | +static constexpr unsigned SAMPLE_RATE_DEFAULT = 48000; |
| 36 | +static constexpr unsigned SAMPLES_PER_BUFFER_DEFAULT = 512; |
| 37 | +static constexpr GOConfig::InterpolationType INTERPOLATION_DEFAULT |
| 38 | + = GOConfig::INTERPOLATION_POLYPHASE; |
| 39 | + |
35 | 40 | static const wxString COUNT = wxT("Count");
|
36 | 41 | static const wxString ENABLED = wxT(".Enabled");
|
37 | 42 | static const wxString MIDI_PORTS = wxT("MidiPorts");
|
@@ -148,7 +153,13 @@ GOConfig::GOConfig(wxString instance)
|
148 | 153 | this, wxT("General"), wxT("ReleaseConcurrency"), 1, MAX_CPU, 1),
|
149 | 154 | LoadConcurrency(
|
150 | 155 | this, wxT("General"), wxT("LoadConcurrency"), 0, MAX_CPU, 1),
|
151 |
| - InterpolationType(this, wxT("General"), wxT("InterpolationType"), 0, 1, 0), |
| 156 | + m_InterpolationType( |
| 157 | + this, |
| 158 | + wxT("General"), |
| 159 | + wxT("InterpolationType"), |
| 160 | + INTERPOLATION_LINEAR, |
| 161 | + INTERPOLATION_POLYPHASE, |
| 162 | + INTERPOLATION_DEFAULT), |
152 | 163 | WaveFormatBytesPerSample(this, wxT("General"), wxT("WaveFormat"), 1, 4, 4),
|
153 | 164 | RecordDownmix(this, wxT("General"), wxT("RecordDownmix"), false),
|
154 | 165 | AttackLoad(this, wxT("General"), wxT("AttackLoad"), 0, 1, 1),
|
@@ -188,8 +199,19 @@ GOConfig::GOConfig(wxString instance)
|
188 | 199 | 1024 * 1024,
|
189 | 200 | GOMemoryPool::GetSystemMemoryLimit()),
|
190 | 201 | SamplesPerBuffer(
|
191 |
| - this, wxT("General"), wxT("SamplesPerBuffer"), 1, MAX_FRAME_SIZE, 1024), |
192 |
| - SampleRate(this, wxT("General"), wxT("SampleRate"), 1000, 100000, 44100), |
| 202 | + this, |
| 203 | + wxT("General"), |
| 204 | + wxT("SamplesPerBuffer"), |
| 205 | + 1, |
| 206 | + MAX_FRAME_SIZE, |
| 207 | + SAMPLES_PER_BUFFER_DEFAULT), |
| 208 | + SampleRate( |
| 209 | + this, |
| 210 | + wxT("General"), |
| 211 | + wxT("SampleRate"), |
| 212 | + 1000, |
| 213 | + 192000, |
| 214 | + SAMPLE_RATE_DEFAULT), |
193 | 215 | Volume(this, wxT("General"), wxT("Volume"), -120, 20, -15),
|
194 | 216 | PolyphonyLimit(
|
195 | 217 | this, wxT("General"), wxT("PolyphonyLimit"), 0, MAX_POLYPHONY, 2048),
|
@@ -219,9 +241,6 @@ GOConfig::GOConfig(wxString instance)
|
219 | 241 | m_MidiIn(MIDI_IN),
|
220 | 242 | m_MidiOut(MIDI_OUT) {}
|
221 | 243 |
|
222 |
| -GOConfig::~GOConfig() { /* Flush(); */ |
223 |
| -} |
224 |
| - |
225 | 244 | void load_ports_config(
|
226 | 245 | GOConfigReader &cfg,
|
227 | 246 | const wxString &groupName,
|
|
0 commit comments