Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
[submodule "libs/oboe"]
path = libs/oboe
url = ../../google/oboe.git
Comment thread
dingodoppelt marked this conversation as resolved.
[submodule "libs/mverb"]
path = libs/mverb
url = https://github.com/martineastwood/mverb.git
Comment thread
dingodoppelt marked this conversation as resolved.
1 change: 1 addition & 0 deletions COMPILING.md
Original file line number Diff line number Diff line change
Expand Up @@ -205,3 +205,4 @@ During compile time some CONFIG arguments can be given to enable or disable spec
| `disable_version_check` | Skip checks for version updates |
| `noupcasename` | Compile Jamulus binary as lower case "jamulus" instead of "Jamulus" |
| `raspijamulus` | Use raspijamulus.sh specific enhancements for build on Raspberry Pi |
| `noreverb` | Don't build the internal reverb and disable all related GUI elements |
49 changes: 8 additions & 41 deletions COPYING
Original file line number Diff line number Diff line change
Expand Up @@ -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.
31 changes: 26 additions & 5 deletions Jamulus.pro
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,20 @@ contains(CONFIG, "nosound") {
warning("\"nosound\" is deprecated: please use \"serveronly\" for a server-only build.")
}

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") {
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...')
}
}
message("building with MVerb")
}

contains(CONFIG, "headless") {
message(Headless mode activated.)
QT -= gui
Expand Down Expand Up @@ -90,6 +104,8 @@ DEFINES += APP_VERSION=\\\"$$VERSION\\\" \
DEFINES += QT_NO_DEPRECATED_WARNINGS

win32 {
# fixes error C7525: inline variables require at least '/std:c++17'
CONFIG += c++17
Comment thread
dingodoppelt marked this conversation as resolved.
DEFINES -= UNICODE # fixes issue with ASIO SDK (asiolist.cpp is not unicode compatible)
DEFINES += NOMINMAX # solves a compiler error in qdatetime.h (Qt5)
RC_FILE = src/res/win-mainicon.rc
Expand Down Expand Up @@ -388,8 +404,7 @@ FORMS_GUI = src/aboutdlgbase.ui \
src/connectdlgbase.ui
}

HEADERS += src/plugins/audioreverb.h \
src/buffer.h \
HEADERS += src/buffer.h \
src/channel.h \
src/global.h \
src/protocol.h \
Expand All @@ -410,6 +425,10 @@ HEADERS += src/plugins/audioreverb.h \
HEADERS += src/client.h \
src/sound/soundbase.h \
src/testbench.h
!contains(CONFIG, noreverb) {
HEADERS += src/plugins/audioreverb.h \
libs/mverb/MVerb.h
}
}

HEADERS_GUI = src/serverdlg.h
Expand Down Expand Up @@ -496,8 +515,7 @@ HEADERS_OPUS_X86 = libs/opus/celt/x86/celt_lpc_sse.h \
libs/opus/celt/x86/x86cpu.h \
$$files(libs/opus/silk/x86/*.h)

SOURCES += src/plugins/audioreverb.cpp \
src/buffer.cpp \
SOURCES += src/buffer.cpp \
src/channel.cpp \
src/main.cpp \
src/protocol.cpp \
Expand All @@ -515,7 +533,10 @@ SOURCES += src/plugins/audioreverb.cpp \

!contains(CONFIG, "serveronly") {
SOURCES += src/client.cpp \
src/sound/soundbase.cpp \
src/sound/soundbase.cpp
!contains(CONFIG, "noreverb") {
SOURCES += src/plugins/audioreverb.cpp
}
}

SOURCES_GUI = src/serverdlg.cpp
Expand Down
1 change: 1 addition & 0 deletions libs/mverb
Submodule mverb added at 9f9512
12 changes: 7 additions & 5 deletions src/client.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -76,8 +76,10 @@ CClient::CClient ( const quint16 iPortNumber,
Socket ( &Channel, iPortNumber, iQosNumber, "", "", bNDisableIPv6, bIPv6Available ),
Sound ( AudioCallback, this, bNoAutoJackConnect, strNClientName ),
iAudioInFader ( AUD_FADER_IN_MIDDLE ),
#ifndef NO_REVERB
bReverbOnLeftChan ( false ),
iReverbLevel ( 0 ),
#endif
iInputBoost ( 1 ),
iSndCrdPrefFrameSizeFactor ( FRAME_SIZE_FACTOR_DEFAULT ),
iSndCrdFrameSizeFactor ( FRAME_SIZE_FACTOR_DEFAULT ),
Expand Down Expand Up @@ -1460,10 +1462,10 @@ void CClient::Init()

// set the channel network properties
Channel.SetAudioStreamProperties ( eAudioCompressionType, iCeltNumCodedBytes, iSndCrdFrameSizeFactor, iNumAudioChannels );

#ifndef NO_REVERB
// init reverberation
AudioReverb.Init ( eAudioChannelConf, iStereoBlockSizeSam, SYSTEM_SAMPLE_RATE_HZ );

AudioReverb.Init ( eAudioChannelConf, iStereoBlockSizeSam );
#endif
// init the sound card conversion buffers
if ( bSndCrdConversionBufferRequired )
{
Expand Down Expand Up @@ -1555,13 +1557,13 @@ void CClient::ProcessAudioDataIntern ( CVector<int16_t>& vecsStereoSndCrd )
#ifndef HEADLESS
SignalLevelMeter.Update ( vecsStereoSndCrd, iMonoBlockSizeSam, true );
#endif

#ifndef NO_REVERB
// add reverberation effect if activated
if ( iReverbLevel != 0 )
{
AudioReverb.Process ( vecsStereoSndCrd, bReverbOnLeftChan, static_cast<float> ( iReverbLevel ) / AUD_REVERB_MAX / 4 );
}

#endif
// apply pan (audio fader) and mix mono signals
if ( !( ( iAudioInFader == AUD_FADER_IN_MIDDLE ) && ( eAudioChannelConf == CC_STEREO ) ) )
{
Expand Down
28 changes: 15 additions & 13 deletions src/client.h
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,9 @@
#include "socket.h"
#include "channel.h"
#include "util.h"
#include "plugins/audioreverb.h"
#ifndef NO_REVERB
# include "plugins/audioreverb.h"
#endif
#include "buffer.h"
#include "signalhandler.h"

Expand Down Expand Up @@ -206,17 +208,15 @@ class CClient : public QObject

int GetAudioInFader() const { return iAudioInFader; }
void SetAudioInFader ( const int iNV ) { iAudioInFader = iNV; }

#ifndef NO_REVERB
int GetReverbLevel() const { return iReverbLevel; }
int GetReverbPreset() const { return AudioReverb.getPreset(); }
void SetReverbLevel ( const int iNL ) { iReverbLevel = iNL; }
void SetReverbPreset ( const int iNP ) { AudioReverb.setPreset ( iNP ); }

bool IsReverbOnLeftChan() const { return bReverbOnLeftChan; }
void SetReverbOnLeftChan ( const bool bIL )
{
bReverbOnLeftChan = bIL;
AudioReverb.Clear();
}

void SetReverbOnLeftChan ( const bool bIL ) { bReverbOnLeftChan = bIL; }
#endif
void SetDoAutoSockBufSize ( const bool bValue );
bool GetDoAutoSockBufSize() const { return Channel.GetDoAutoSockBufSize(); }

Expand Down Expand Up @@ -431,11 +431,13 @@ class CClient : public QObject

CVector<uint8_t> vecbyNetwData;

std::atomic<int> iAudioInFader;
std::atomic<bool> bReverbOnLeftChan;
std::atomic<int> iReverbLevel;
CAudioReverb AudioReverb;
std::atomic<int> iInputBoost;
int iAudioInFader;
#ifndef NO_REVERB
bool bReverbOnLeftChan;
int iReverbLevel;
CAudioReverb AudioReverb;
#endif
int iInputBoost;

int iSndCrdPrefFrameSizeFactor;
int iSndCrdFrameSizeFactor;
Expand Down
36 changes: 23 additions & 13 deletions src/clientdlg.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ CClientDlg::CClientDlg ( CClient* pNCliP,
"If you are connected, pressing this button will end the session." ) );

butConnect->setAccessibleName ( tr ( "Connect and disconnect toggle button" ) );

#ifndef NO_REVERB
// reverberation level
QString strAudReverb = "<b>" + tr ( "Reverb effect" ) + ":</b> " +
tr ( "Reverb can be applied to one local mono audio channel or to both "
Expand All @@ -142,7 +142,13 @@ CClientDlg::CClientDlg ( CClient* pNCliP,
rbtReverbSelL->setAccessibleName ( tr ( "Left channel selection for reverb" ) );
rbtReverbSelR->setWhatsThis ( strRevChanSel );
rbtReverbSelR->setAccessibleName ( tr ( "Right channel selection for reverb" ) );

#endif
#ifdef NO_REVERB
lblAudioReverb->setVisible ( false );
sldAudioReverb->setVisible ( false );
rbtReverbSelL->setVisible ( false );
rbtReverbSelR->setVisible ( false );
#endif
// delay LED
QString strLEDDelay = "<b>" + tr ( "Delay Status LED" ) + ":</b> " + tr ( "Shows the current audio delay status:" ) +
"<ul>"
Expand Down Expand Up @@ -256,19 +262,20 @@ CClientDlg::CClientDlg ( CClient* pNCliP,
// init status LEDs
ledBuffers->Reset();
ledDelay->Reset();

#ifndef NO_REVERB
// init audio reverberation
sldAudioReverb->setRange ( 0, AUD_REVERB_MAX );
const int iCurAudReverb = pClient->GetReverbLevel();
sldAudioReverb->setValue ( iCurAudReverb );
sldAudioReverb->setTickInterval ( AUD_REVERB_MAX / 5 );
#endif

// init reverb channel (needed for pan feature as well)
UpdateRevSelection();

// init input boost
pClient->SetInputBoost ( pSettings->iInputBoost );

// init reverb channel
UpdateRevSelection();

// init connect dialog
ConnectDlg.SetShowAllMusicians ( pSettings->bConnectDlgShowAllMusicians );

Expand Down Expand Up @@ -487,14 +494,14 @@ CClientDlg::CClientDlg ( CClient* pNCliP,
QObject::connect ( &TimerCheckAudioDeviceOk, &QTimer::timeout, this, &CClientDlg::OnTimerCheckAudioDeviceOk );

QObject::connect ( &TimerDetectFeedback, &QTimer::timeout, this, &CClientDlg::OnTimerDetectFeedback );

#ifndef NO_REVERB
QObject::connect ( sldAudioReverb, &QSlider::valueChanged, this, &CClientDlg::OnAudioReverbValueChanged );

// radio buttons
QObject::connect ( rbtReverbSelL, &QRadioButton::clicked, this, &CClientDlg::OnReverbSelLClicked );

QObject::connect ( rbtReverbSelR, &QRadioButton::clicked, this, &CClientDlg::OnReverbSelRClicked );

#endif
// other
QObject::connect ( pClient, &CClient::ConClientListMesReceived, this, &CClientDlg::OnConClientListMesReceived );

Expand Down Expand Up @@ -682,9 +689,9 @@ void CClientDlg::ManageDragNDrop ( QDropEvent* Event, const bool bCheckAccept )
}
}
}

void CClientDlg::UpdateRevSelection()
{
#ifndef NO_REVERB
if ( pClient->GetAudioChannels() == CC_STEREO )
{
// for stereo make channel selection invisible since
Expand All @@ -708,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 );
Comment thread
dingodoppelt marked this conversation as resolved.
}

void CClientDlg::OnConnectDlgAccepted()
{
// We had an issue that the accepted signal was emit twice if a list item was double
Expand Down Expand Up @@ -1361,7 +1367,8 @@ void CClientDlg::SetGUIDesign ( const EGUIDesign eNewDesign )
" image: url(:/png/fader/res/ledbuttonpressed.png); }"
"QCheckBox { color: rgb(220, 220, 220);"
" font: bold; }" );
#ifdef _WIN32
#ifndef NO_REVERB
# ifdef _WIN32
// Workaround QT-Windows problem: This should not be necessary since in the
// background frame the style sheet for QRadioButton was already set. But it
// seems that it is only applied if the style was set to default and then back
Expand All @@ -1370,6 +1377,7 @@ void CClientDlg::SetGUIDesign ( const EGUIDesign eNewDesign )
"font: bold;" );
rbtReverbSelR->setStyleSheet ( "color: rgb(220, 220, 220);"
"font: bold;" );
# endif
#endif

ledBuffers->SetType ( CMultiColorLED::MT_LED );
Expand All @@ -1380,10 +1388,12 @@ void CClientDlg::SetGUIDesign ( const EGUIDesign eNewDesign )
// reset style sheet and set original parameters
backgroundFrame->setStyleSheet ( "" );

#ifdef _WIN32
#ifndef NO_REVERB
# ifdef _WIN32
// Workaround QT-Windows problem: See above description
rbtReverbSelL->setStyleSheet ( "" );
rbtReverbSelR->setStyleSheet ( "" );
# endif
#endif

ledBuffers->SetType ( CMultiColorLED::MT_INDICATOR );
Expand Down
4 changes: 2 additions & 2 deletions src/clientdlg.h
Original file line number Diff line number Diff line change
Expand Up @@ -201,13 +201,13 @@ public slots:
void OnSettingsStateChanged ( int value );
void OnChatStateChanged ( int value );
void OnLocalMuteStateChanged ( int value );

#ifndef NO_REVERB
void OnAudioReverbValueChanged ( int value ) { pClient->SetReverbLevel ( value ); }

void OnReverbSelLClicked() { pClient->SetReverbOnLeftChan ( true ); }

void OnReverbSelRClicked() { pClient->SetReverbOnLeftChan ( false ); }

#endif
void OnFeedbackDetectionChanged ( int state ) { ClientSettingsDlg.SetEnableFeedbackDetection ( state == Qt::Checked ); }

void OnConClientListMesReceived ( CVector<CChannelInfo> vecChanInfo );
Expand Down
Loading
Loading