Skip to content

Commit aa18ac7

Browse files
authored
Increased maximum supporter config settings values and changed the defaults #2115 (#2118)
1 parent a673ab7 commit aa18ac7

File tree

8 files changed

+56
-25
lines changed

8 files changed

+56
-25
lines changed

CHANGELOG.md

+3
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
- Changed default sample rate, samples per buffer and interpolation type to 48000, 512 and Polyphase https://github.com/GrandOrgue/grandorgue/issues/2115
2+
- Increased the maximum samples per buffer to 2048 https://github.com/GrandOrgue/grandorgue/issues/2115
3+
- Increased the maximum supported sample rate to 192000 https://github.com/GrandOrgue/grandorgue/issues/2115
14
- Fixed nested scrolling in the MidiObject dialog on macOs https://github.com/GrandOrgue/grandorgue/issues/1972
25
- Increased the maximum number of user-defined temperaments to 999 https://github.com/GrandOrgue/grandorgue/issues/1982
36
# 3.15.4 (2024-12-20)

help/grandorgue.xml

+9-6
Original file line numberDiff line numberDiff line change
@@ -3806,7 +3806,7 @@ The detuning is small enough so that the ear can't appreciate the tuning differe
38063806
<varlistentry>
38073807
<term>Linear</term>
38083808
<listitem>
3809-
<simpara>This method lowers CPU load at he expense of audio quality. It is the only usable option when <link linkend="losslesscompression">lossless compression</link> is enabled, as polyphase interpolation is not yet implemented with lossless compression.</simpara>
3809+
<simpara>This method lowers CPU load at he expense of audio quality.</simpara>
38103810
</listitem>
38113811
</varlistentry>
38123812
</variablelist>
@@ -4489,15 +4489,18 @@ role="strong">STOP</emphasis> button is depressed.
44894489
<indexterm>
44904490
<primary>Sample rate</primary>
44914491
</indexterm>
4492-
<para>Selects the output sample rate. Allowed values are 44100, 48000 and 96000 Hz.</para>
4492+
<para>
4493+
Selects the output sample rate. Allowed values are 44100, 48000,
4494+
96000 and 192000 Hz.
4495+
</para>
44934496
<para>The sample rate should match both the configured sample rate in the audio interface and the sample rate of the recorded samples to avoid resampling. If not, resampling can occur in all layers of the audio stack, and audio quality can suffer.</para>
44944497
</sect3>
44954498
<sect3 id="samplesperbuffer">
44964499
<title>Samples per buffer</title>
44974500
<indexterm>
44984501
<primary>Samples per buffer</primary>
44994502
</indexterm>
4500-
<para>Allowed values range from 16 to 1024 by increment of 16.</para>
4503+
<para>Allowed values range from 16 to 2048 by increment of 16.</para>
45014504
<para>This parameter sets the output buffer size. Larger values usually reduce sound artifacts at the expense of latency.</para>
45024505
</sect3>
45034506
</sect2>
@@ -6671,7 +6674,7 @@ period.
66716674
<para>
66726675
The unit "samples" counts the number of samples from the start of the
66736676
WAV file. On sample includes the values of all channels, eg: for a
6674-
stereo WAV file at 44.1 kHz, 1 second is equivalent to 44100 samples.
6677+
stereo WAV file at 48 kHz, 1 second is equivalent to 48000 samples.
66756678
</para>
66766679
<figure>
66776680
<title>background bitmaps 1 to 30</title>
@@ -6709,7 +6712,7 @@ The samples are stored as WAV files according to the WAV file
67096712
specification. The supported formats are: 8 bit, 16 bit and 24 bit PCM
67106713
or 32 bit IEEE float, either mono or stereo. The preferred sample rates
67116714
are 44100 or 48000 Hz - GO supports any sample rate between 22000 and
6712-
96000 Hz. GO only supports a single data chunk. To play looped
6715+
192000 Hz. GO only supports a single data chunk. To play looped
67136716
samples, they must include cue points (cue chunk) and loops (smpl
67146717
chunk). If there are multiple loops, each loop should overlap another
67156718
loop. Attack samples include the attack phase and the loops - they may
@@ -10762,7 +10765,7 @@ Synthesized tremulants have the following attributes:
1076210765
<term>Period</term>
1076310766
<listitem>
1076410767
<para>
10765-
(integer 32 - 44100, required) Period of the tremulant in ms
10768+
(integer 32 - 441000, required) Period of the tremulant in ms
1076610769
</para>
1076710770
</listitem>
1076810771
</varlistentry>

src/grandorgue/config/GOConfig.cpp

+26-7
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/*
22
* Copyright 2006 Milan Digital Audio LLC
3-
* Copyright 2009-2024 GrandOrgue contributors (see AUTHORS)
3+
* Copyright 2009-2025 GrandOrgue contributors (see AUTHORS)
44
* License GPL-2.0 or later
55
* (https://www.gnu.org/licenses/old-licenses/gpl-2.0.html).
66
*/
@@ -32,6 +32,11 @@
3232
#include "sound/ports/GOSoundPort.h"
3333
#include "sound/ports/GOSoundPortFactory.h"
3434

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+
3540
static const wxString COUNT = wxT("Count");
3641
static const wxString ENABLED = wxT(".Enabled");
3742
static const wxString MIDI_PORTS = wxT("MidiPorts");
@@ -148,7 +153,13 @@ GOConfig::GOConfig(wxString instance)
148153
this, wxT("General"), wxT("ReleaseConcurrency"), 1, MAX_CPU, 1),
149154
LoadConcurrency(
150155
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),
152163
WaveFormatBytesPerSample(this, wxT("General"), wxT("WaveFormat"), 1, 4, 4),
153164
RecordDownmix(this, wxT("General"), wxT("RecordDownmix"), false),
154165
AttackLoad(this, wxT("General"), wxT("AttackLoad"), 0, 1, 1),
@@ -188,8 +199,19 @@ GOConfig::GOConfig(wxString instance)
188199
1024 * 1024,
189200
GOMemoryPool::GetSystemMemoryLimit()),
190201
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),
193215
Volume(this, wxT("General"), wxT("Volume"), -120, 20, -15),
194216
PolyphonyLimit(
195217
this, wxT("General"), wxT("PolyphonyLimit"), 0, MAX_POLYPHONY, 2048),
@@ -219,9 +241,6 @@ GOConfig::GOConfig(wxString instance)
219241
m_MidiIn(MIDI_IN),
220242
m_MidiOut(MIDI_OUT) {}
221243

222-
GOConfig::~GOConfig() { /* Flush(); */
223-
}
224-
225244
void load_ports_config(
226245
GOConfigReader &cfg,
227246
const wxString &groupName,

src/grandorgue/config/GOConfig.h

+8-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/*
22
* Copyright 2006 Milan Digital Audio LLC
3-
* Copyright 2009-2024 GrandOrgue contributors (see AUTHORS)
3+
* Copyright 2009-2025 GrandOrgue contributors (see AUTHORS)
44
* License GPL-2.0 or later
55
* (https://www.gnu.org/licenses/old-licenses/gpl-2.0.html).
66
*/
@@ -44,6 +44,12 @@ typedef struct {
4444
enum class GOInitialLoadType { LOAD_NONE, LOAD_LAST_USED, LOAD_FIRST };
4545

4646
class GOConfig : public GOSettingStore, public GOOrganList {
47+
public:
48+
enum InterpolationType {
49+
INTERPOLATION_LINEAR = 0,
50+
INTERPOLATION_POLYPHASE,
51+
};
52+
4753
private:
4854
wxString m_InstanceName;
4955
wxString m_ConfigFileName;
@@ -68,7 +74,6 @@ class GOConfig : public GOSettingStore, public GOOrganList {
6874

6975
public:
7076
GOConfig(wxString instance);
71-
~GOConfig();
7277

7378
GOSettingDirectory OrganSettingsPath;
7479
GOSettingDirectory OrganCachePath;
@@ -77,7 +82,7 @@ class GOConfig : public GOSettingStore, public GOOrganList {
7782
GOSettingUnsigned ReleaseConcurrency;
7883
GOSettingUnsigned LoadConcurrency;
7984

80-
GOSettingUnsigned InterpolationType;
85+
GOSettingUnsigned m_InterpolationType;
8186
GOSettingUnsigned WaveFormatBytesPerSample;
8287
GOSettingBool RecordDownmix;
8388

src/grandorgue/gui/dialogs/settings/GOSettingsAudio.cpp

+3-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/*
22
* Copyright 2006 Milan Digital Audio LLC
3-
* Copyright 2009-2024 GrandOrgue contributors (see AUTHORS)
3+
* Copyright 2009-2025 GrandOrgue contributors (see AUTHORS)
44
* License GPL-2.0 or later
55
* (https://www.gnu.org/licenses/old-licenses/gpl-2.0.html).
66
*/
@@ -202,7 +202,8 @@ bool GOSettingsAudio::TransferDataToWindow() {
202202
m_SampleRate->Append(wxT("44100"));
203203
m_SampleRate->Append(wxT("48000"));
204204
m_SampleRate->Append(wxT("96000"));
205-
m_SampleRate->Select(0);
205+
m_SampleRate->Append(wxT("192000"));
206+
m_SampleRate->Select(1);
206207
for (unsigned i = 0; i < m_SampleRate->GetCount(); i++)
207208
if (
208209
wxString::Format(wxT("%d"), m_config.SampleRate())

src/grandorgue/gui/dialogs/settings/GOSettingsOptions.cpp

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/*
22
* Copyright 2006 Milan Digital Audio LLC
3-
* Copyright 2009-2024 GrandOrgue contributors (see AUTHORS)
3+
* Copyright 2009-2025 GrandOrgue contributors (see AUTHORS)
44
* License GPL-2.0 or later
55
* (https://www.gnu.org/licenses/old-licenses/gpl-2.0.html).
66
*/
@@ -230,7 +230,7 @@ GOSettingsOptions::GOSettingsOptions(GOConfig &settings, wxWindow *parent)
230230
item6->Add(grid, 0, wxEXPAND | wxALL, 5);
231231
item9->Add(item6, 0, wxEXPAND | wxALL, 5);
232232

233-
m_Interpolation->Select(m_config.InterpolationType());
233+
m_Interpolation->Select(m_config.m_InterpolationType());
234234
m_Concurrency->Select(m_config.Concurrency() - 1);
235235
m_ReleaseConcurrency->Select(m_config.ReleaseConcurrency() - 1);
236236
m_LoadConcurrency->Select(m_config.LoadConcurrency());
@@ -446,7 +446,7 @@ bool GOSettingsOptions::TransferDataFromWindow() {
446446
m_config.AttackLoad(m_AttackLoad->GetSelection());
447447
m_config.ReleaseLoad(m_ReleaseLoad->GetSelection());
448448
m_config.LoadChannels(m_Channels->GetSelection());
449-
m_config.InterpolationType(m_Interpolation->GetSelection());
449+
m_config.m_InterpolationType(m_Interpolation->GetSelection());
450450
m_config.MemoryLimit(m_MemoryLimit->GetValue());
451451
m_config.MetronomeBPM(m_MetronomeBPM->GetValue());
452452
m_config.MetronomeMeasure(m_MetronomeMeasure->GetValue());

src/grandorgue/sound/GOSound.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/*
22
* Copyright 2006 Milan Digital Audio LLC
3-
* Copyright 2009-2024 GrandOrgue contributors (see AUTHORS)
3+
* Copyright 2009-2025 GrandOrgue contributors (see AUTHORS)
44
* License GPL-2.0 or later
55
* (https://www.gnu.org/licenses/old-licenses/gpl-2.0.html).
66
*/
@@ -120,7 +120,7 @@ void GOSound::OpenSound() {
120120
m_SoundEngine.SetHardPolyphony(m_config.PolyphonyLimit());
121121
m_SoundEngine.SetScaledReleases(m_config.ScaleRelease());
122122
m_SoundEngine.SetRandomizeSpeaking(m_config.RandomizeSpeaking());
123-
m_SoundEngine.SetInterpolationType(m_config.InterpolationType());
123+
m_SoundEngine.SetInterpolationType(m_config.m_InterpolationType());
124124
m_SoundEngine.SetAudioGroupCount(audio_group_count);
125125
unsigned sample_rate = m_config.SampleRate();
126126
m_AudioRecorder.SetBytesPerSample(m_config.WaveFormatBytesPerSample());

src/grandorgue/sound/GOSoundDefs.h

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/*
22
* Copyright 2006 Milan Digital Audio LLC
3-
* Copyright 2009-2024 GrandOrgue contributors (see AUTHORS)
3+
* Copyright 2009-2025 GrandOrgue contributors (see AUTHORS)
44
* License GPL-2.0 or later
55
* (https://www.gnu.org/licenses/old-licenses/gpl-2.0.html).
66
*/
@@ -18,7 +18,7 @@
1818
#define SHORT_LOOP_LENGTH 256
1919

2020
/* Maximum number of blocks (1 block is nChannels samples) per frame */
21-
#define MAX_FRAME_SIZE (1024)
21+
#define MAX_FRAME_SIZE (2048)
2222

2323
/* Maximum number of channels the engine supports. This value cannot be
2424
* changed at present.

0 commit comments

Comments
 (0)