( &QComboBox::activated ),
this,
&CClientSettingsDlg::OnReverbPresetChanged );
-
+#endif
// buttons
#if defined( _WIN32 ) && !defined( WITH_JACK )
// Driver Setup button is only available for Windows when JACK is not used
@@ -1413,9 +1418,9 @@ void CClientSettingsDlg::OnInputBoostChanged()
pSettings->iInputBoost = cbxInputBoost->currentIndex() + 1;
pClient->SetInputBoost ( pSettings->iInputBoost );
}
-
+#ifndef NO_REVERB
void CClientSettingsDlg::OnReverbPresetChanged() { pClient->SetReverbPreset ( cbxReverbPreset->currentIndex() ); }
-
+#endif
void CClientSettingsDlg::OnAliasTextChanged ( const QString& strNewName )
{
// check length
diff --git a/src/clientsettingsdlg.h b/src/clientsettingsdlg.h
index 6564e21ca9..f6ade362b2 100644
--- a/src/clientsettingsdlg.h
+++ b/src/clientsettingsdlg.h
@@ -109,7 +109,9 @@ public slots:
void OnCustomDirectoriesChanged ( bool bDelete );
void OnNewClientLevelEditingFinished() { pSettings->iNewClientFaderLevel = edtNewClientLevel->text().toInt(); }
void OnInputBoostChanged();
+#ifndef NO_REVERB
void OnReverbPresetChanged();
+#endif
void OnSndCrdBufferDelayButtonGroupClicked ( QAbstractButton* button );
void OnSoundcardActivated ( int iSndDevIdx );
void OnLInChanActivated ( int iChanIdx );
diff --git a/src/plugins/audioreverb.h b/src/plugins/audioreverb.h
index 20ab6ad34b..df5704e224 100644
--- a/src/plugins/audioreverb.h
+++ b/src/plugins/audioreverb.h
@@ -73,6 +73,5 @@ class CAudioReverb
{ .9, .5, .1, .5, 0., .5, 1., 1., .75 },
{ .5, .5, .5, .5, .5, .75, 1., 1., .5 },
{ .2, .4, .4, .6, .1, .05, 1., 1., .4 },
- { .4, .2, .3, .6, .2, .2, 1., 1., .5 }
- };
+ { .4, .2, .3, .6, .2, .2, 1., 1., .5 } };
};
diff --git a/src/settings.cpp b/src/settings.cpp
index 257a4f0aa2..548dc3a018 100644
--- a/src/settings.cpp
+++ b/src/settings.cpp
@@ -495,7 +495,7 @@ void CClientSettings::ReadSettingsFromXML ( const QDomDocument& IniXMLDocument,
{
pClient->SetAudioInFader ( iValue );
}
-
+# ifndef NO_REVERB
// reverberation level
if ( GetNumericIniSet ( IniXMLDocument, "client", "revlev", 0, AUD_REVERB_MAX, iValue ) )
{
@@ -513,7 +513,7 @@ void CClientSettings::ReadSettingsFromXML ( const QDomDocument& IniXMLDocument,
{
pClient->SetReverbPreset ( iValue );
}
-
+# endif
// sound card selection
const QString strError = pClient->SetSndCrdDev ( FromBase64ToString ( GetIniSetting ( IniXMLDocument, "client", "auddev_base64", "" ) ) );
@@ -950,7 +950,7 @@ void CClientSettings::WriteSettingsToXML ( QDomDocument& IniXMLDocument, bool is
// audio fader
SetNumericIniSet ( IniXMLDocument, "client", "audfad", pClient->GetAudioInFader() );
-
+# ifndef NO_REVERB
// reverberation level
SetNumericIniSet ( IniXMLDocument, "client", "revlev", pClient->GetReverbLevel() );
@@ -959,7 +959,7 @@ void CClientSettings::WriteSettingsToXML ( QDomDocument& IniXMLDocument, bool is
// reverb preset
SetNumericIniSet ( IniXMLDocument, "client", "revpreset", pClient->GetReverbPreset() );
-
+# endif
// sound card selection
PutIniSetting ( IniXMLDocument, "client", "auddev_base64", ToBase64 ( pClient->GetSndCrdDev() ) );
From cdb9c402df5af273b971957ea6094f455694c6f2 Mon Sep 17 00:00:00 2001
From: Nils Brederlow <62596379+dingodoppelt@users.noreply.github.com>
Date: Mon, 10 Aug 2026 06:33:19 +0200
Subject: [PATCH 03/17] Update preset names
---
src/clientsettingsdlg.cpp | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/clientsettingsdlg.cpp b/src/clientsettingsdlg.cpp
index 1c44f134d7..b0582362e3 100644
--- a/src/clientsettingsdlg.cpp
+++ b/src/clientsettingsdlg.cpp
@@ -384,7 +384,7 @@ CClientSettingsDlg::CClientSettingsDlg ( CClient* pNCliP, CClientSettings* pNSet
QString strReverbPreset = "" + tr ( "Reverb Preset" ) + ": " +
tr ( "Jamulus uses MVerb by Martin Eastwood for reverberation. "
"MVerb comes with a set of presets you can select here. "
- "Available Presets: Subtle, Stadium, Cupboard, Dark, Halves " );
+ "Available Presets: Subtle, Stadium, Cupboard, Dark, Halves, Drum Room, Club " );
lblReverbPreset->setWhatsThis ( strReverbPreset );
cbxReverbPreset->setWhatsThis ( strReverbPreset );
cbxReverbPreset->setAccessibleName ( tr ( "Reverb Preset combo box" ) );
From a9f9de8189f39b0baf2eecb4c05659cd5e603e91 Mon Sep 17 00:00:00 2001
From: Nils Brederlow <62596379+dingodoppelt@users.noreply.github.com>
Date: Mon, 10 Aug 2026 19:55:12 +0200
Subject: [PATCH 04/17] Throw an error and exit QMake when MVerb could not be
cloned as a submodule although requested
---
Jamulus.pro | 19 +++++++++----------
1 file changed, 9 insertions(+), 10 deletions(-)
diff --git a/Jamulus.pro b/Jamulus.pro
index 298957f675..9f7d8ab1d7 100644
--- a/Jamulus.pro
+++ b/Jamulus.pro
@@ -42,19 +42,18 @@ contains(CONFIG, "nosound") {
warning("\"nosound\" is deprecated: please use \"serveronly\" for a server-only build.")
}
-!contains(CONFIG, "serveronly") {
- !contains(CONFIG, "noreverb"):!exists($$PWD/libs/mverb/MVerb.h) {
+contains(CONFIG, "serveronly") | contains(CONFIG, "noreverb") {
+ message("building without reverb plugin")
+ DEFINES += NO_REVERB
+} else {
+ !exists($$PWD/libs/mverb/MVerb.h) {
!system("git -C $$PWD submodule update --init --force libs/mverb") {
- message("MVerb not found and could not be cloned.")
- CONFIG += noreverb
+ error('MVerb not found and could not be cloned as a submodule.$$escape_expand(\n) \
+ Try cloning MVerb manually with: \'git submodule update --init --force libs/mverb\'$$escape_expand(\n) \
+ To disable the reverb plugin call QMake with "CONFIG+=noreverb"$$escape_expand(\n)Exiting...')
}
}
- contains(CONFIG, "noreverb") {
- message("building without reverb plugin")
- DEFINES += NO_REVERB
- } else {
- message("building with MVerb")
- }
+ message("building with MVerb")
}
contains(CONFIG, "headless") {
From c3213b9853a4fa6137653db986e1d92e9eec3b43 Mon Sep 17 00:00:00 2001
From: Nils Brederlow <62596379+dingodoppelt@users.noreply.github.com>
Date: Wed, 12 Aug 2026 10:54:22 +0200
Subject: [PATCH 05/17] Update copyright info
---
src/util.cpp | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/src/util.cpp b/src/util.cpp
index 39efa10a16..779eafea6e 100644
--- a/src/util.cpp
+++ b/src/util.cpp
@@ -524,10 +524,9 @@ CAboutDlg::CAboutDlg ( QWidget* parent ) : CBaseDlg ( parent )
# endif
# ifndef HEADLESS
"" +
- tr ( "Audio reverberation code by Perry R. Cook and Gary P. Scavone" ) +
- ", 1995 - 2021"
- ", The Synthesis ToolKit in C++ (STK)"
- ", https://ccrma.stanford.edu/software/stk"
+ tr ( "Audio reverberation powered by MVerb" ) +
+ ", Copyright (c) 2010 Martin Eastwood"
+ ", https://github.com/martineastwood/mverb"
"
"
"" +
QString ( tr ( "Some pixmaps are from the %1" ) ).arg ( "Open Clip Art Library (OCAL)" ) +
From 4eb4b4521d297353932b543f3cde00ad1ff3e8ff Mon Sep 17 00:00:00 2001
From: Nils Brederlow <62596379+dingodoppelt@users.noreply.github.com>
Date: Thu, 13 Aug 2026 12:57:51 +0200
Subject: [PATCH 06/17] Fix pan knobs not being displayed when building without
reverb
---
src/clientdlg.cpp | 10 +++++-----
src/clientdlg.h | 9 +--------
2 files changed, 6 insertions(+), 13 deletions(-)
diff --git a/src/clientdlg.cpp b/src/clientdlg.cpp
index e51fd13e07..431d5dd770 100644
--- a/src/clientdlg.cpp
+++ b/src/clientdlg.cpp
@@ -268,10 +268,11 @@ CClientDlg::CClientDlg ( CClient* pNCliP,
const int iCurAudReverb = pClient->GetReverbLevel();
sldAudioReverb->setValue ( iCurAudReverb );
sldAudioReverb->setTickInterval ( AUD_REVERB_MAX / 5 );
+#endif
- // init reverb channel
+ // init reverb channel (needed for pan feature as well)
UpdateRevSelection();
-#endif
+
// init input boost
pClient->SetInputBoost ( pSettings->iInputBoost );
@@ -688,9 +689,9 @@ void CClientDlg::ManageDragNDrop ( QDropEvent* Event, const bool bCheckAccept )
}
}
}
-#ifndef NO_REVERB
void CClientDlg::UpdateRevSelection()
{
+#ifndef NO_REVERB
if ( pClient->GetAudioChannels() == CC_STEREO )
{
// for stereo make channel selection invisible since
@@ -714,11 +715,10 @@ void CClientDlg::UpdateRevSelection()
rbtReverbSelR->setChecked ( true );
}
}
-
+#endif
// update visibility of the pan controls in the audio mixer board (pan is not supported for mono)
MainMixerBoard->SetDisplayPans ( pClient->GetAudioChannels() != CC_MONO );
}
-#endif
void CClientDlg::OnConnectDlgAccepted()
{
// We had an issue that the accepted signal was emit twice if a list item was double
diff --git a/src/clientdlg.h b/src/clientdlg.h
index 8dc8a67805..302e81343d 100644
--- a/src/clientdlg.h
+++ b/src/clientdlg.h
@@ -114,9 +114,7 @@ class CClientDlg : public CBaseDlg, private Ui_CClientDlgBase
void ShowChatWindow ( const bool bForceRaise = true );
void ShowAnalyzerConsole();
void UpdateAudioFaderSlider();
-#ifndef NO_REVERB
void UpdateRevSelection();
-#endif
void ManageDragNDrop ( QDropEvent* Event, const bool bCheckAccept );
void SetPingTime ( const int iPingTime, const int iOverallDelayMs, const CMultiColorLED::ELightColor eOverallDelayLEDColor );
@@ -260,12 +258,7 @@ public slots:
void OnMeterStyleChanged();
void OnRecorderStateReceived ( ERecorderState eRecorderState );
void SetMixerBoardDeco ( const ERecorderState newRecorderState, const EGUIDesign eNewDesign );
- void OnAudioChannelsChanged()
- {
-#ifndef NO_REVERB
- UpdateRevSelection();
-#endif
- }
+ void OnAudioChannelsChanged() { UpdateRevSelection(); }
void OnNumClientsChanged ( int iNewNumClients );
void accept() { close(); } // introduced by pljones
From 45550a8adf06739404d54c6de9a8c43c68643aa1 Mon Sep 17 00:00:00 2001
From: Nils Brederlow <62596379+dingodoppelt@users.noreply.github.com>
Date: Thu, 13 Aug 2026 20:48:59 +0200
Subject: [PATCH 07/17] add copyright and licensing info for MVerb
---
COPYING | 49 ++++++-------------------------------
src/plugins/audioreverb.cpp | 6 ++---
src/util.cpp | 2 +-
3 files changed, 12 insertions(+), 45 deletions(-)
diff --git a/COPYING b/COPYING
index d7bfd7f9eb..d7a5d127d6 100644
--- a/COPYING
+++ b/COPYING
@@ -1678,44 +1678,11 @@ Broadcom Corporation:
https://datatracker.ietf.org/ipr/1526/
--------------------------------------------------------------------------------
-Component "Synthesis ToolKit" license:
-
-The Synthesis ToolKit in C++ (STK) is a set of open source audio
-signal processing and algorithmic synthesis classes written in the
-C++ programming language. STK was designed to facilitate rapid
-development of music synthesis and audio processing software, with
-an emphasis on cross-platform functionality, realtime control,
-ease of use, and educational example code. STK currently runs
-with realtime support (audio and MIDI) on Linux, Macintosh OS X,
-and Windows computer platforms. Generic, non-realtime support has
-been tested under NeXTStep, Sun, and other platforms and should
-work with any standard C++ compiler.
-
-STK WWW site: http://ccrma.stanford.edu/software/stk/
-
-The Synthesis ToolKit in C++ (STK)
-Copyright (c) 1995-2011 Perry R. Cook and Gary P. Scavone
-
-Permission is hereby granted, free of charge, to any person obtaining
-a copy of this software and associated documentation files (the
-"Software"), to deal in the Software without restriction, including
-without limitation the rights to use, copy, modify, merge, publish,
-distribute, sublicense, and/or sell copies of the Software, and to
-permit persons to whom the Software is furnished to do so, subject to
-the following conditions:
-
-The above copyright notice and this permission notice shall be
-included in all copies or substantial portions of the Software.
-
-Any person wishing to distribute modifications to the Software is
-asked to send the modifications to the original developer so that they
-can be incorporated into the canonical version. This is, however, not
-a binding provision of this license.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
-IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
-CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
-TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
-SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+Component "MVerb Library" license:
+
+Jamulus uses MVerb - Copyright (c) 2010 Martin Eastwood
+
+MVerb is free software: you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation, either version 3 of the License, or
+at your option) any later version.
diff --git a/src/plugins/audioreverb.cpp b/src/plugins/audioreverb.cpp
index 2e0a9885bb..719ec5a939 100644
--- a/src/plugins/audioreverb.cpp
+++ b/src/plugins/audioreverb.cpp
@@ -2,9 +2,9 @@
* Audio Reverberation *
\******************************************************************************/
/*
- The following code calls MVerb for reverberation.
- MVerb was written by Martin Eastwood.
- https://github.com/martineastwood/mverb
+ The following code uses the MVerb library by Martin Eastwood.
+ Source: https://github.com/martineastwood/mverb
+ License: GNU General Public License v3.0 (GPL-3.0)
*/
#include "audioreverb.h"
diff --git a/src/util.cpp b/src/util.cpp
index 779eafea6e..de6dc361b2 100644
--- a/src/util.cpp
+++ b/src/util.cpp
@@ -525,7 +525,7 @@ CAboutDlg::CAboutDlg ( QWidget* parent ) : CBaseDlg ( parent )
# ifndef HEADLESS
"
" +
tr ( "Audio reverberation powered by MVerb" ) +
- ", Copyright (c) 2010 Martin Eastwood"
+ ", Copyright (c) 2010 Martin Eastwood, licensed under the GPL3.0 License"
", https://github.com/martineastwood/mverb"
"
"
"" +
From b256769a3adede8156facc433db3f8466dabeb67 Mon Sep 17 00:00:00 2001
From: Nils Brederlow <62596379+dingodoppelt@users.noreply.github.com>
Date: Sat, 15 Aug 2026 20:29:50 +0200
Subject: [PATCH 08/17] Use #else
---
src/clientsettingsdlg.cpp | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/src/clientsettingsdlg.cpp b/src/clientsettingsdlg.cpp
index b0582362e3..9782e5a15e 100644
--- a/src/clientsettingsdlg.cpp
+++ b/src/clientsettingsdlg.cpp
@@ -388,8 +388,7 @@ CClientSettingsDlg::CClientSettingsDlg ( CClient* pNCliP, CClientSettings* pNSet
lblReverbPreset->setWhatsThis ( strReverbPreset );
cbxReverbPreset->setWhatsThis ( strReverbPreset );
cbxReverbPreset->setAccessibleName ( tr ( "Reverb Preset combo box" ) );
-#endif
-#ifdef NO_REVERB
+#else
lblReverbPreset->setVisible ( false );
cbxReverbPreset->setVisible ( false );
verticalSpacer_13->changeSize ( 0, 0 );
From 32e6435930f17d6214499099e4765dd05d97a0c8 Mon Sep 17 00:00:00 2001
From: Nils Brederlow <62596379+dingodoppelt@users.noreply.github.com>
Date: Sun, 6 Sep 2026 08:34:19 +0200
Subject: [PATCH 09/17] Apply suggestion from code review
---
src/plugins/audioreverb.cpp | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/plugins/audioreverb.cpp b/src/plugins/audioreverb.cpp
index 719ec5a939..fce10ccfca 100644
--- a/src/plugins/audioreverb.cpp
+++ b/src/plugins/audioreverb.cpp
@@ -15,8 +15,8 @@ void CAudioReverb::Init ( const EAudChanConf eNAudioChannelConf, const int iNSte
iStereoBlockSizeSam = iNStereoBlockSizeSam;
// Jamulus uses interleaved stereo, mverb operates on a 2-dimensional array instead
- // Calculate the number of frames for each channel ( iStereoBlockSizeSam / 2 )
- numFrames = iStereoBlockSizeSam >> 1;
+ // Calculate the number of frames for each channel
+ numFrames = iStereoBlockSizeSam / 2;
// These buffers get filled with dry signal and are then passed to mverb
// They need to be vectors as the windows builds fail when arrays are used
From 972da6fbf1f289a9c654277071e635aa7a0d4415 Mon Sep 17 00:00:00 2001
From: Nils Brederlow <62596379+dingodoppelt@users.noreply.github.com>
Date: Sun, 6 Sep 2026 08:36:17 +0200
Subject: [PATCH 10/17] Fix typo
---
src/plugins/audioreverb.cpp | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/plugins/audioreverb.cpp b/src/plugins/audioreverb.cpp
index fce10ccfca..12100755bf 100644
--- a/src/plugins/audioreverb.cpp
+++ b/src/plugins/audioreverb.cpp
@@ -19,7 +19,7 @@ void CAudioReverb::Init ( const EAudChanConf eNAudioChannelConf, const int iNSte
numFrames = iStereoBlockSizeSam / 2;
// These buffers get filled with dry signal and are then passed to mverb
- // They need to be vectors as the windows builds fail when arrays are used
+ // They need to be vectors as the Windows builds fail when arrays are used
bufL.resize ( numFrames );
bufR.resize ( numFrames );
From be79807a66bc97fecb919ca6671433907b483ad3 Mon Sep 17 00:00:00 2001
From: Nils Brederlow <62596379+dingodoppelt@users.noreply.github.com>
Date: Sun, 6 Sep 2026 08:57:29 +0200
Subject: [PATCH 11/17] Fix preset selection from settings
---
src/settings.cpp | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/settings.cpp b/src/settings.cpp
index 548dc3a018..dd34b3e34a 100644
--- a/src/settings.cpp
+++ b/src/settings.cpp
@@ -508,8 +508,8 @@ void CClientSettings::ReadSettingsFromXML ( const QDomDocument& IniXMLDocument,
pClient->SetReverbOnLeftChan ( bValue );
}
- // reverb preset
- if ( GetNumericIniSet ( IniXMLDocument, "client", "revpreset", 0, 4, iValue ) )
+ // reverb preset (7 presets, set range accordingly)
+ if ( GetNumericIniSet ( IniXMLDocument, "client", "revpreset", 0, 6, iValue ) )
{
pClient->SetReverbPreset ( iValue );
}
From 0c72837f9146bf8923282e6ec5858277c62edd87 Mon Sep 17 00:00:00 2001
From: Nils Brederlow <62596379+dingodoppelt@users.noreply.github.com>
Date: Sun, 6 Sep 2026 09:00:11 +0200
Subject: [PATCH 12/17] Move function code out of the header file
---
src/plugins/audioreverb.cpp | 21 +++++++++++++++++++++
src/plugins/audioreverb.h | 21 ++-------------------
2 files changed, 23 insertions(+), 19 deletions(-)
diff --git a/src/plugins/audioreverb.cpp b/src/plugins/audioreverb.cpp
index 12100755bf..4e10968bb0 100644
--- a/src/plugins/audioreverb.cpp
+++ b/src/plugins/audioreverb.cpp
@@ -9,6 +9,17 @@
#include "audioreverb.h"
+CAudioReverb::CAudioReverb()
+{
+ fMaxShort = static_cast ( _MAXSHORT );
+ iPreset = STADIUM;
+
+ // Create MVerb on the heap
+ mverb = std::unique_ptr> ( new MVerb() );
+ mverb->setSampleRate ( SYSTEM_SAMPLE_RATE_HZ );
+ loadPreset();
+}
+
void CAudioReverb::Init ( const EAudChanConf eNAudioChannelConf, const int iNStereoBlockSizeSam )
{
eAudioChannelConf = eNAudioChannelConf;
@@ -35,6 +46,16 @@ void CAudioReverb::loadPreset()
}
}
+void CAudioReverb::setPreset ( const int iNPreset )
+{
+ // silently fail if preset doesn't exist
+ if ( MathUtils::InRange ( iNPreset, 0, NUM_REV_PRESETS ) )
+ {
+ iPreset = iNPreset;
+ loadPreset();
+ }
+};
+
void CAudioReverb::Process ( CVector& vecsStereoInOut, const bool bReverbOnLeftChan, const float fReverbGain )
{
diff --git a/src/plugins/audioreverb.h b/src/plugins/audioreverb.h
index df5704e224..49e840c0df 100644
--- a/src/plugins/audioreverb.h
+++ b/src/plugins/audioreverb.h
@@ -14,30 +14,13 @@
class CAudioReverb
{
public:
- CAudioReverb()
- {
- fMaxShort = static_cast ( _MAXSHORT );
- iPreset = STADIUM;
-
- // Create MVerb on the heap
- mverb = std::unique_ptr> ( new MVerb() );
- mverb->setSampleRate ( SYSTEM_SAMPLE_RATE_HZ );
- loadPreset();
- }
+ CAudioReverb();
void Init ( const EAudChanConf eNAudioChannelConf, const int iNStereoBlockSizeSam );
void Clear();
void Process ( CVector& vecsStereoInOut, const bool bReverbOnLeftChan, const float fReverbGain );
- void setPreset ( const int iNPreset )
- {
- // silently fail if preset doesn't exist
- if ( MathUtils::InRange ( iNPreset, 0, NUM_REV_PRESETS ) )
- {
- iPreset = iNPreset;
- loadPreset();
- }
- };
+ void setPreset ( const int iNPreset );
int getPreset() const { return iPreset; };
protected:
From d0479e57b2a7439af94e1de3ce37fd9332e67220 Mon Sep 17 00:00:00 2001
From: Nils Brederlow <62596379+dingodoppelt@users.noreply.github.com>
Date: Sun, 6 Sep 2026 09:01:56 +0200
Subject: [PATCH 13/17] fix style
---
src/plugins/audioreverb.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/plugins/audioreverb.h b/src/plugins/audioreverb.h
index 49e840c0df..f80de03628 100644
--- a/src/plugins/audioreverb.h
+++ b/src/plugins/audioreverb.h
@@ -21,7 +21,7 @@ class CAudioReverb
void Clear();
void Process ( CVector& vecsStereoInOut, const bool bReverbOnLeftChan, const float fReverbGain );
void setPreset ( const int iNPreset );
- int getPreset() const { return iPreset; };
+ int getPreset() const { return iPreset; };
protected:
std::unique_ptr> mverb;
From 77ccca7a9d762cc8f924068034aa423597cb887e Mon Sep 17 00:00:00 2001
From: Nils Brederlow <62596379+dingodoppelt@users.noreply.github.com>
Date: Sun, 6 Sep 2026 09:26:31 +0200
Subject: [PATCH 14/17] Keep enum naming in line with existing code, move enum
into util.h
---
src/plugins/audioreverb.cpp | 4 ++--
src/plugins/audioreverb.h | 14 +-------------
src/util.h | 13 +++++++++++++
3 files changed, 16 insertions(+), 15 deletions(-)
diff --git a/src/plugins/audioreverb.cpp b/src/plugins/audioreverb.cpp
index 4e10968bb0..4c17c79ac3 100644
--- a/src/plugins/audioreverb.cpp
+++ b/src/plugins/audioreverb.cpp
@@ -12,7 +12,7 @@
CAudioReverb::CAudioReverb()
{
fMaxShort = static_cast ( _MAXSHORT );
- iPreset = STADIUM;
+ iPreset = RP_STADIUM;
// Create MVerb on the heap
mverb = std::unique_ptr> ( new MVerb() );
@@ -49,7 +49,7 @@ void CAudioReverb::loadPreset()
void CAudioReverb::setPreset ( const int iNPreset )
{
// silently fail if preset doesn't exist
- if ( MathUtils::InRange ( iNPreset, 0, NUM_REV_PRESETS ) )
+ if ( MathUtils::InRange ( iNPreset, 0, RP_NUM_REV_PRESETS ) )
{
iPreset = iNPreset;
loadPreset();
diff --git a/src/plugins/audioreverb.h b/src/plugins/audioreverb.h
index f80de03628..bbbf2c80fc 100644
--- a/src/plugins/audioreverb.h
+++ b/src/plugins/audioreverb.h
@@ -36,21 +36,9 @@ class CAudioReverb
std::vector bufL;
std::vector bufR;
- enum
- {
- SUBTLE = 0,
- STADIUM,
- CUPBOARD,
- DARK,
- HALVES,
- DRUMROOM,
- CLUB,
- NUM_REV_PRESETS
- };
-
// Parameters are set iteratively by enum. See MVerb.h for reference.
// NOTE: parameters "GAIN" and "MIX" must be "1."
- constexpr static inline float const presets[NUM_REV_PRESETS][MVerb::NUM_PARAMS] = { { 0., .5, 1., .5, 0., .5, 1., 1., .75 },
+ constexpr static inline float const presets[RP_NUM_REV_PRESETS][MVerb::NUM_PARAMS] = { { 0., .5, 1., .5, 0., .5, 1., 1., .75 },
{ 0., .5, 1., .5, 0., 1., 1., 1., .75 },
{ 0., .5, 1., .5, 0., .25, 1., 1., .75 },
{ .9, .5, .1, .5, 0., .5, 1., 1., .75 },
diff --git a/src/util.h b/src/util.h
index 08e45166cb..865bb7d4ff 100644
--- a/src/util.h
+++ b/src/util.h
@@ -639,6 +639,19 @@ enum EFeatureSet
FS_RPC_ENABLED = 12
};
+// Reverb presets
+enum EReverbPresets
+{
+ RP_SUBTLE = 0,
+ RP_STADIUM = 1,
+ RP_CUPBOARD = 2,
+ RP_DARK = 3,
+ RP_HALVES = 4,
+ RP_DRUMROOM = 5,
+ RP_CLUB = 6,
+ RP_NUM_REV_PRESETS = 7
+};
+
inline QString DirectoryTypeToString ( EDirectoryType eAddrType )
{
switch ( eAddrType )
From cfe7361444d7c371ba91b50b607835c8f96d507d Mon Sep 17 00:00:00 2001
From: Nils Brederlow <62596379+dingodoppelt@users.noreply.github.com>
Date: Sun, 6 Sep 2026 09:44:41 +0200
Subject: [PATCH 15/17] fix style
---
src/plugins/audioreverb.h | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/src/plugins/audioreverb.h b/src/plugins/audioreverb.h
index bbbf2c80fc..eb65a2d205 100644
--- a/src/plugins/audioreverb.h
+++ b/src/plugins/audioreverb.h
@@ -39,10 +39,10 @@ class CAudioReverb
// Parameters are set iteratively by enum. See MVerb.h for reference.
// NOTE: parameters "GAIN" and "MIX" must be "1."
constexpr static inline float const presets[RP_NUM_REV_PRESETS][MVerb::NUM_PARAMS] = { { 0., .5, 1., .5, 0., .5, 1., 1., .75 },
- { 0., .5, 1., .5, 0., 1., 1., 1., .75 },
- { 0., .5, 1., .5, 0., .25, 1., 1., .75 },
- { .9, .5, .1, .5, 0., .5, 1., 1., .75 },
- { .5, .5, .5, .5, .5, .75, 1., 1., .5 },
- { .2, .4, .4, .6, .1, .05, 1., 1., .4 },
- { .4, .2, .3, .6, .2, .2, 1., 1., .5 } };
+ { 0., .5, 1., .5, 0., 1., 1., 1., .75 },
+ { 0., .5, 1., .5, 0., .25, 1., 1., .75 },
+ { .9, .5, .1, .5, 0., .5, 1., 1., .75 },
+ { .5, .5, .5, .5, .5, .75, 1., 1., .5 },
+ { .2, .4, .4, .6, .1, .05, 1., 1., .4 },
+ { .4, .2, .3, .6, .2, .2, 1., 1., .5 } };
};
From 91f1e340380fbd6558e05fb21ea8e117b3a4bbfa Mon Sep 17 00:00:00 2001
From: Nils Brederlow <62596379+dingodoppelt@users.noreply.github.com>
Date: Sun, 6 Sep 2026 10:15:13 +0200
Subject: [PATCH 16/17] Apply reverb preset on block boundaries only
---
src/plugins/audioreverb.cpp | 10 +++++++---
src/plugins/audioreverb.h | 1 +
2 files changed, 8 insertions(+), 3 deletions(-)
diff --git a/src/plugins/audioreverb.cpp b/src/plugins/audioreverb.cpp
index 4c17c79ac3..ea513bb033 100644
--- a/src/plugins/audioreverb.cpp
+++ b/src/plugins/audioreverb.cpp
@@ -9,7 +9,7 @@
#include "audioreverb.h"
-CAudioReverb::CAudioReverb()
+CAudioReverb::CAudioReverb() : bPresetChangeQueued ( false )
{
fMaxShort = static_cast ( _MAXSHORT );
iPreset = RP_STADIUM;
@@ -44,6 +44,7 @@ void CAudioReverb::loadPreset()
{
mverb->setParameter ( i, presets[iPreset][i] );
}
+ bPresetChangeQueued = false;
}
void CAudioReverb::setPreset ( const int iNPreset )
@@ -51,13 +52,16 @@ void CAudioReverb::setPreset ( const int iNPreset )
// silently fail if preset doesn't exist
if ( MathUtils::InRange ( iNPreset, 0, RP_NUM_REV_PRESETS ) )
{
- iPreset = iNPreset;
- loadPreset();
+ iPreset = iNPreset;
+ bPresetChangeQueued = true;
}
};
void CAudioReverb::Process ( CVector& vecsStereoInOut, const bool bReverbOnLeftChan, const float fReverbGain )
{
+ // This is called from the audio thread so a preset change must only be carried out on the audio block boundaries to avoid a race condition
+ if ( bPresetChangeQueued )
+ loadPreset();
// One buffer to pass to mverb's process function
float* fInput[2] = { bufL.data(), bufR.data() };
diff --git a/src/plugins/audioreverb.h b/src/plugins/audioreverb.h
index eb65a2d205..51cbdfe00e 100644
--- a/src/plugins/audioreverb.h
+++ b/src/plugins/audioreverb.h
@@ -31,6 +31,7 @@ class CAudioReverb
int iStereoBlockSizeSam;
float fMaxShort;
int iPreset;
+ bool bPresetChangeQueued;
int numFrames;
std::vector bufL;
From 8d497f8ee9d4c3557d8a769641963f5d72076cd3 Mon Sep 17 00:00:00 2001
From: Nils Brederlow <62596379+dingodoppelt@users.noreply.github.com>
Date: Sun, 6 Sep 2026 14:44:24 +0200
Subject: [PATCH 17/17] Wrap enum in if-clause for noreverb
---
src/util.h | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/util.h b/src/util.h
index 865bb7d4ff..cd8e256610 100644
--- a/src/util.h
+++ b/src/util.h
@@ -638,7 +638,7 @@ enum EFeatureSet
FS_HAS_GUI = 11,
FS_RPC_ENABLED = 12
};
-
+#ifndef NO_REVERB
// Reverb presets
enum EReverbPresets
{
@@ -651,7 +651,7 @@ enum EReverbPresets
RP_CLUB = 6,
RP_NUM_REV_PRESETS = 7
};
-
+#endif
inline QString DirectoryTypeToString ( EDirectoryType eAddrType )
{
switch ( eAddrType )