2011-04-25 12:51:57 +02:00
|
|
|
/******************************************************************************\
|
2020-01-01 15:41:43 +01:00
|
|
|
* Copyright (c) 2004-2020
|
2011-04-25 12:51:57 +02:00
|
|
|
*
|
|
|
|
* Author(s):
|
|
|
|
* Volker Fischer
|
|
|
|
*
|
|
|
|
******************************************************************************
|
|
|
|
*
|
|
|
|
* This program 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 2 of the License, or (at your option) any later
|
|
|
|
* version.
|
|
|
|
*
|
|
|
|
* This program is distributed in the hope that it will be useful, but WITHOUT
|
|
|
|
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
|
|
|
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
|
|
|
|
* details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU General Public License along with
|
|
|
|
* this program; if not, write to the Free Software Foundation, Inc.,
|
|
|
|
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
|
|
|
*
|
|
|
|
\******************************************************************************/
|
|
|
|
|
2019-07-09 08:52:38 +02:00
|
|
|
#pragma once
|
2011-04-25 12:51:57 +02:00
|
|
|
|
2013-01-02 21:41:04 +01:00
|
|
|
#include <QHostAddress>
|
|
|
|
#include <QHostInfo>
|
|
|
|
#include <QString>
|
|
|
|
#include <QDateTime>
|
|
|
|
#include <QMessageBox>
|
2014-07-26 07:58:01 +02:00
|
|
|
#ifdef USE_OPUS_SHARED_LIB
|
|
|
|
# include "opus/opus_custom.h"
|
|
|
|
#else
|
|
|
|
# include "opus_custom.h"
|
|
|
|
#endif
|
2011-04-25 12:51:57 +02:00
|
|
|
#include "global.h"
|
|
|
|
#include "socket.h"
|
|
|
|
#include "channel.h"
|
|
|
|
#include "util.h"
|
|
|
|
#include "buffer.h"
|
|
|
|
#ifdef LLCON_VST_PLUGIN
|
|
|
|
# include "vstsound.h"
|
|
|
|
#else
|
2018-03-22 21:50:05 +01:00
|
|
|
# if defined ( _WIN32 ) && !defined ( JACK_REPLACES_ASIO )
|
2011-04-25 12:51:57 +02:00
|
|
|
# include "../windows/sound.h"
|
|
|
|
# else
|
2016-07-31 10:02:32 +02:00
|
|
|
# if ( defined ( __APPLE__ ) || defined ( __MACOSX ) ) && !defined ( JACK_REPLACES_COREAUDIO )
|
2011-04-25 12:51:57 +02:00
|
|
|
# include "../mac/sound.h"
|
|
|
|
# else
|
2014-01-21 18:25:46 +01:00
|
|
|
# ifdef ANDROID
|
|
|
|
# include "../android/sound.h"
|
|
|
|
# else
|
|
|
|
# include "../linux/sound.h"
|
2018-03-22 21:50:05 +01:00
|
|
|
# ifndef JACK_REPLACES_ASIO // these headers are not available in Windows OS
|
|
|
|
# include <sched.h>
|
|
|
|
# include <netdb.h>
|
|
|
|
# endif
|
2014-01-21 18:25:46 +01:00
|
|
|
# include <socket.h>
|
|
|
|
# endif
|
2011-04-25 12:51:57 +02:00
|
|
|
# endif
|
|
|
|
# endif
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
|
|
/* Definitions ****************************************************************/
|
|
|
|
// audio in fader range
|
2020-04-13 16:01:25 +02:00
|
|
|
#define AUD_FADER_IN_MIN 0
|
|
|
|
#define AUD_FADER_IN_MAX 100
|
|
|
|
#define AUD_FADER_IN_MIDDLE ( AUD_FADER_IN_MAX / 2 )
|
2011-04-25 12:51:57 +02:00
|
|
|
|
|
|
|
// audio reverberation range
|
2020-04-13 16:01:25 +02:00
|
|
|
#define AUD_REVERB_MAX 100
|
2011-04-25 12:51:57 +02:00
|
|
|
|
2013-03-10 09:19:41 +01:00
|
|
|
// OPUS number of coded bytes per audio packet
|
|
|
|
// TODO we have to use new numbers for OPUS to avoid that old CELT packets
|
|
|
|
// are used in the OPUS decoder (which gives a bad noise output signal).
|
|
|
|
// Later on when the CELT is completely removed we could set the OPUS
|
|
|
|
// numbers back to the original CELT values (to reduce network load)
|
2013-06-09 08:42:33 +02:00
|
|
|
|
|
|
|
// calculation to get from the number of bytes to the code rate in bps:
|
|
|
|
// rate [pbs] = Fs / L * N * 8, where
|
|
|
|
// Fs: sampling rate (SYSTEM_SAMPLE_RATE_HZ)
|
|
|
|
// L: number of samples per packet (SYSTEM_FRAME_SIZE_SAMPLES)
|
|
|
|
// N: number of bytes per packet (values below)
|
2020-04-13 16:01:25 +02:00
|
|
|
#define OPUS_NUM_BYTES_MONO_LOW_QUALITY 12
|
|
|
|
#define OPUS_NUM_BYTES_MONO_NORMAL_QUALITY 22
|
2020-04-23 19:36:00 +02:00
|
|
|
#define OPUS_NUM_BYTES_MONO_HIGH_QUALITY 36
|
2020-04-13 16:01:25 +02:00
|
|
|
#define OPUS_NUM_BYTES_MONO_LOW_QUALITY_DBLE_FRAMESIZE 25
|
|
|
|
#define OPUS_NUM_BYTES_MONO_NORMAL_QUALITY_DBLE_FRAMESIZE 45
|
|
|
|
#define OPUS_NUM_BYTES_MONO_HIGH_QUALITY_DBLE_FRAMESIZE 71
|
2013-06-09 08:42:33 +02:00
|
|
|
|
2020-04-13 16:01:25 +02:00
|
|
|
#define OPUS_NUM_BYTES_STEREO_LOW_QUALITY 24
|
|
|
|
#define OPUS_NUM_BYTES_STEREO_NORMAL_QUALITY 35
|
2020-04-23 19:36:00 +02:00
|
|
|
#define OPUS_NUM_BYTES_STEREO_HIGH_QUALITY 73
|
2020-04-13 16:01:25 +02:00
|
|
|
#define OPUS_NUM_BYTES_STEREO_LOW_QUALITY_DBLE_FRAMESIZE 47
|
|
|
|
#define OPUS_NUM_BYTES_STEREO_NORMAL_QUALITY_DBLE_FRAMESIZE 71
|
|
|
|
#define OPUS_NUM_BYTES_STEREO_HIGH_QUALITY_DBLE_FRAMESIZE 142
|
2013-03-10 09:19:41 +01:00
|
|
|
|
|
|
|
|
2011-04-25 12:51:57 +02:00
|
|
|
/* Classes ********************************************************************/
|
|
|
|
class CClient : public QObject
|
|
|
|
{
|
|
|
|
Q_OBJECT
|
|
|
|
|
|
|
|
public:
|
2015-03-25 21:29:52 +01:00
|
|
|
CClient ( const quint16 iPortNumber,
|
2019-01-12 13:45:08 +01:00
|
|
|
const QString& strConnOnStartupAddress,
|
2019-09-22 20:13:08 +02:00
|
|
|
const int iCtrlMIDIChannel,
|
2020-04-30 20:48:48 +02:00
|
|
|
const bool bNoAutoJackConnect,
|
2020-04-30 22:03:01 +02:00
|
|
|
const QString& strNClientName );
|
2011-04-25 12:51:57 +02:00
|
|
|
|
|
|
|
void Start();
|
|
|
|
void Stop();
|
|
|
|
bool IsRunning() { return Sound.IsRunning(); }
|
|
|
|
bool SetServerAddr ( QString strNAddr );
|
2014-01-03 09:54:49 +01:00
|
|
|
|
2020-04-22 21:19:55 +02:00
|
|
|
double MicLeveldB_L() { return SignalLevelMeter.MicLeveldBLeft(); }
|
|
|
|
double MicLeveldB_R() { return SignalLevelMeter.MicLeveldBRight(); }
|
2014-01-03 09:54:49 +01:00
|
|
|
|
|
|
|
bool GetAndResetbJitterBufferOKFlag();
|
|
|
|
|
2011-04-25 12:51:57 +02:00
|
|
|
bool IsConnected() { return Channel.IsConnected(); }
|
|
|
|
|
|
|
|
EGUIDesign GetGUIDesign() const { return eGUIDesign; }
|
2020-04-12 12:33:50 +02:00
|
|
|
void SetGUIDesign ( const EGUIDesign eNGD ) { eGUIDesign = eNGD; }
|
2011-04-25 12:51:57 +02:00
|
|
|
|
2020-03-30 22:36:25 +02:00
|
|
|
bool GetDisplayChannelLevels() const { return bDisplayChannelLevels; }
|
|
|
|
void SetDisplayChannelLevels ( const bool bNDCL );
|
|
|
|
|
2013-08-15 21:15:01 +02:00
|
|
|
EAudioQuality GetAudioQuality() const { return eAudioQuality; }
|
|
|
|
void SetAudioQuality ( const EAudioQuality eNAudioQuality );
|
2011-04-25 12:51:57 +02:00
|
|
|
|
2014-02-24 20:51:57 +01:00
|
|
|
EAudChanConf GetAudioChannels() const { return eAudioChannelConf; }
|
|
|
|
void SetAudioChannels ( const EAudChanConf eNAudChanConf );
|
2011-04-25 12:51:57 +02:00
|
|
|
|
2020-04-11 14:27:50 +02:00
|
|
|
void SetServerListCentralServerAddress ( const QString& sNCentServAddr ) { strCentralServerAddress = sNCentServAddr; }
|
|
|
|
QString GetServerListCentralServerAddress() { return strCentralServerAddress; }
|
2011-05-02 21:48:36 +02:00
|
|
|
|
2020-04-12 12:33:50 +02:00
|
|
|
void SetCentralServerAddressType ( const ECSAddType eNCSAT );
|
2020-04-11 14:27:50 +02:00
|
|
|
ECSAddType GetCentralServerAddressType() { return eCentralServerAddressType; }
|
2011-05-02 21:48:36 +02:00
|
|
|
|
2020-04-12 12:33:50 +02:00
|
|
|
int GetAudioInFader() const { return iAudioInFader; }
|
2011-04-25 12:51:57 +02:00
|
|
|
void SetAudioInFader ( const int iNV ) { iAudioInFader = iNV; }
|
|
|
|
|
2020-04-12 12:33:50 +02:00
|
|
|
int GetReverbLevel() const { return iReverbLevel; }
|
2011-04-25 12:51:57 +02:00
|
|
|
void SetReverbLevel ( const int iNL ) { iReverbLevel = iNL; }
|
|
|
|
|
|
|
|
bool IsReverbOnLeftChan() const { return bReverbOnLeftChan; }
|
|
|
|
void SetReverbOnLeftChan ( const bool bIL )
|
|
|
|
{
|
|
|
|
bReverbOnLeftChan = bIL;
|
|
|
|
AudioReverbL.Clear();
|
|
|
|
AudioReverbR.Clear();
|
|
|
|
}
|
|
|
|
|
2011-05-28 08:01:26 +02:00
|
|
|
void SetDoAutoSockBufSize ( const bool bValue );
|
2011-05-22 22:40:29 +02:00
|
|
|
bool GetDoAutoSockBufSize() const { return Channel.GetDoAutoSockBufSize(); }
|
|
|
|
|
2011-05-17 17:39:33 +02:00
|
|
|
void SetSockBufNumFrames ( const int iNumBlocks,
|
|
|
|
const bool bPreserve = false )
|
2011-04-25 12:51:57 +02:00
|
|
|
{
|
2011-05-25 23:01:45 +02:00
|
|
|
Channel.SetSockBufNumFrames ( iNumBlocks, bPreserve );
|
2011-04-25 12:51:57 +02:00
|
|
|
}
|
|
|
|
int GetSockBufNumFrames() { return Channel.GetSockBufNumFrames(); }
|
|
|
|
|
2011-05-27 22:29:37 +02:00
|
|
|
void SetServerSockBufNumFrames ( const int iNumBlocks )
|
|
|
|
{
|
|
|
|
iServerSockBufNumFrames = iNumBlocks;
|
|
|
|
|
|
|
|
// if auto setting is disabled, inform the server about the new size
|
|
|
|
if ( !GetDoAutoSockBufSize() )
|
|
|
|
{
|
|
|
|
Channel.CreateJitBufMes ( iServerSockBufNumFrames );
|
|
|
|
}
|
|
|
|
}
|
|
|
|
int GetServerSockBufNumFrames() { return iServerSockBufNumFrames; }
|
|
|
|
|
2011-04-25 12:51:57 +02:00
|
|
|
int GetUploadRateKbps() { return Channel.GetUploadRateKbps(); }
|
|
|
|
|
|
|
|
// sound card device selection
|
|
|
|
int GetSndCrdNumDev() { return Sound.GetNumDev(); }
|
|
|
|
QString GetSndCrdDeviceName ( const int iDiD )
|
|
|
|
{ return Sound.GetDeviceName ( iDiD ); }
|
|
|
|
|
|
|
|
QString SetSndCrdDev ( const int iNewDev );
|
|
|
|
int GetSndCrdDev() { return Sound.GetDev(); }
|
|
|
|
void OpenSndCrdDriverSetup() { Sound.OpenDriverSetup(); }
|
|
|
|
|
|
|
|
// sound card channel selection
|
|
|
|
int GetSndCrdNumInputChannels() { return Sound.GetNumInputChannels(); }
|
|
|
|
QString GetSndCrdInputChannelName ( const int iDiD ) { return Sound.GetInputChannelName ( iDiD ); }
|
|
|
|
void SetSndCrdLeftInputChannel ( const int iNewChan );
|
|
|
|
void SetSndCrdRightInputChannel ( const int iNewChan );
|
|
|
|
int GetSndCrdLeftInputChannel() { return Sound.GetLeftInputChannel(); }
|
|
|
|
int GetSndCrdRightInputChannel() { return Sound.GetRightInputChannel(); }
|
|
|
|
|
|
|
|
int GetSndCrdNumOutputChannels() { return Sound.GetNumOutputChannels(); }
|
|
|
|
QString GetSndCrdOutputChannelName ( const int iDiD ) { return Sound.GetOutputChannelName ( iDiD ); }
|
|
|
|
void SetSndCrdLeftOutputChannel ( const int iNewChan );
|
|
|
|
void SetSndCrdRightOutputChannel ( const int iNewChan );
|
|
|
|
int GetSndCrdLeftOutputChannel() { return Sound.GetLeftOutputChannel(); }
|
|
|
|
int GetSndCrdRightOutputChannel() { return Sound.GetRightOutputChannel(); }
|
|
|
|
|
|
|
|
void SetSndCrdPrefFrameSizeFactor ( const int iNewFactor );
|
2020-04-12 12:33:50 +02:00
|
|
|
int GetSndCrdPrefFrameSizeFactor() { return iSndCrdPrefFrameSizeFactor; }
|
2011-04-25 12:51:57 +02:00
|
|
|
|
2020-04-17 21:21:37 +02:00
|
|
|
void SetEnableOPUS64 ( const bool eNEnableOPUS64 );
|
|
|
|
bool GetEnableOPUS64() { return bEnableOPUS64; }
|
|
|
|
|
2011-04-25 12:51:57 +02:00
|
|
|
int GetSndCrdActualMonoBlSize()
|
|
|
|
{
|
|
|
|
// the actual sound card mono block size depends on whether a
|
|
|
|
// sound card conversion buffer is used or not
|
|
|
|
if ( bSndCrdConversionBufferRequired )
|
|
|
|
{
|
|
|
|
return iSndCardMonoBlockSizeSamConvBuff;
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
return iMonoBlockSizeSam;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
int GetSystemMonoBlSize() { return iMonoBlockSizeSam; }
|
|
|
|
int GetSndCrdConvBufAdditionalDelayMonoBlSize()
|
|
|
|
{
|
|
|
|
if ( bSndCrdConversionBufferRequired )
|
|
|
|
{
|
|
|
|
// by introducing the conversion buffer we also introduce additional
|
|
|
|
// delay which equals the "internal" mono buffer size
|
|
|
|
return iMonoBlockSizeSam;
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
bool GetFraSiFactPrefSupported() { return bFraSiFactPrefSupported; }
|
|
|
|
bool GetFraSiFactDefSupported() { return bFraSiFactDefSupported; }
|
|
|
|
bool GetFraSiFactSafeSupported() { return bFraSiFactSafeSupported; }
|
|
|
|
|
2020-04-16 17:54:45 +02:00
|
|
|
void SetMuteOutStream ( const bool bDoMute ) { bMuteOutStream = bDoMute; }
|
2020-04-08 14:48:33 +02:00
|
|
|
|
2011-04-25 12:51:57 +02:00
|
|
|
void SetRemoteChanGain ( const int iId, const double dGain )
|
|
|
|
{ Channel.SetRemoteChanGain ( iId, dGain ); }
|
|
|
|
|
2013-02-11 16:21:53 +01:00
|
|
|
void SetRemoteInfo() { Channel.SetRemoteInfo ( ChannelInfo ); }
|
2011-04-25 12:51:57 +02:00
|
|
|
|
|
|
|
void CreateChatTextMes ( const QString& strChatText )
|
|
|
|
{ Channel.CreateChatTextMes ( strChatText ); }
|
|
|
|
|
2011-05-24 21:40:57 +02:00
|
|
|
void CreateCLPingMes()
|
|
|
|
{ ConnLessProtocol.CreateCLPingMes ( Channel.GetAddress(), PreparePingMessage() ); }
|
2011-05-24 20:44:51 +02:00
|
|
|
|
|
|
|
void CreateCLServerListPingMes ( const CHostAddress& InetAddr )
|
|
|
|
{
|
|
|
|
ConnLessProtocol.CreateCLPingWithNumClientsMes ( InetAddr,
|
|
|
|
PreparePingMessage(),
|
|
|
|
0 /* dummy */ );
|
|
|
|
}
|
2011-04-25 12:51:57 +02:00
|
|
|
|
2014-02-21 22:25:26 +01:00
|
|
|
void CreateCLServerListReqVerAndOSMes ( const CHostAddress& InetAddr )
|
2015-12-09 16:50:30 +01:00
|
|
|
{ ConnLessProtocol.CreateCLReqVersionAndOSMes ( InetAddr ); }
|
|
|
|
|
|
|
|
void CreateCLServerListReqConnClientsListMes ( const CHostAddress& InetAddr )
|
|
|
|
{ ConnLessProtocol.CreateCLReqConnClientsListMes ( InetAddr ); }
|
2014-02-21 22:25:26 +01:00
|
|
|
|
2011-04-25 12:51:57 +02:00
|
|
|
void CreateCLReqServerListMes ( const CHostAddress& InetAddr )
|
|
|
|
{ ConnLessProtocol.CreateCLReqServerListMes ( InetAddr ); }
|
|
|
|
|
|
|
|
int EstimatedOverallDelay ( const int iPingTimeMs );
|
|
|
|
|
2015-03-14 17:54:36 +01:00
|
|
|
void GetBufErrorRates ( CVector<double>& vecErrRates, double& dLimit, double& dMaxUpLimit )
|
|
|
|
{ Channel.GetBufErrorRates ( vecErrRates, dLimit, dMaxUpLimit ); }
|
2011-04-25 12:51:57 +02:00
|
|
|
|
|
|
|
// settings
|
|
|
|
CVector<QString> vstrIPAddress;
|
2013-02-11 16:21:53 +01:00
|
|
|
CChannelCoreInfo ChannelInfo;
|
2013-02-28 21:54:47 +01:00
|
|
|
CVector<QString> vecStoredFaderTags;
|
|
|
|
CVector<int> vecStoredFaderLevels;
|
2014-01-19 16:02:25 +01:00
|
|
|
CVector<int> vecStoredFaderIsSolo;
|
2020-04-04 17:14:59 +02:00
|
|
|
CVector<int> vecStoredFaderIsMute;
|
2015-11-25 16:52:00 +01:00
|
|
|
int iNewClientFaderLevel;
|
2020-04-19 10:04:19 +02:00
|
|
|
bool bConnectDlgShowAllMusicians;
|
2020-04-30 22:03:01 +02:00
|
|
|
QString strClientName;
|
2011-04-25 12:51:57 +02:00
|
|
|
|
2013-08-26 21:59:18 +02:00
|
|
|
// window position/state settings
|
|
|
|
QByteArray vecWindowPosMain;
|
|
|
|
QByteArray vecWindowPosSettings;
|
|
|
|
QByteArray vecWindowPosChat;
|
2015-01-31 09:15:56 +01:00
|
|
|
QByteArray vecWindowPosProfile;
|
2013-08-26 21:59:18 +02:00
|
|
|
QByteArray vecWindowPosConnect;
|
|
|
|
bool bWindowWasShownSettings;
|
|
|
|
bool bWindowWasShownChat;
|
2015-01-31 09:15:56 +01:00
|
|
|
bool bWindowWasShownProfile;
|
2013-08-26 21:59:18 +02:00
|
|
|
bool bWindowWasShownConnect;
|
|
|
|
|
2011-04-25 12:51:57 +02:00
|
|
|
#ifdef LLCON_VST_PLUGIN
|
|
|
|
// VST version must have direct access to sound object
|
|
|
|
CSound* GetSound() { return &Sound; }
|
|
|
|
#endif
|
|
|
|
|
|
|
|
protected:
|
|
|
|
// callback function must be static, otherwise it does not work
|
2011-05-22 22:40:29 +02:00
|
|
|
static void AudioCallback ( CVector<short>& psData, void* arg );
|
2011-04-25 12:51:57 +02:00
|
|
|
|
2011-05-22 22:40:29 +02:00
|
|
|
void Init();
|
2020-04-23 20:54:58 +02:00
|
|
|
void ProcessSndCrdAudioData ( CVector<short>& vecsMultChanAudioSndCrd );
|
2011-05-22 22:40:29 +02:00
|
|
|
void ProcessAudioDataIntern ( CVector<short>& vecsStereoSndCrd );
|
2011-04-25 12:51:57 +02:00
|
|
|
|
2011-05-22 22:40:29 +02:00
|
|
|
int PreparePingMessage();
|
|
|
|
int EvaluatePingMessage ( const int iMs );
|
2011-05-27 22:29:37 +02:00
|
|
|
void CreateServerJitterBufferMessage();
|
2011-04-25 12:51:57 +02:00
|
|
|
|
|
|
|
// only one channel is needed for client application
|
|
|
|
CChannel Channel;
|
|
|
|
CProtocol ConnLessProtocol;
|
|
|
|
|
|
|
|
// audio encoder/decoder
|
2020-04-12 22:10:53 +02:00
|
|
|
OpusCustomMode* Opus64Mode;
|
|
|
|
OpusCustomEncoder* Opus64EncoderMono;
|
|
|
|
OpusCustomDecoder* Opus64DecoderMono;
|
|
|
|
OpusCustomEncoder* Opus64EncoderStereo;
|
|
|
|
OpusCustomDecoder* Opus64DecoderStereo;
|
2013-02-16 20:11:30 +01:00
|
|
|
OpusCustomMode* OpusMode;
|
|
|
|
OpusCustomEncoder* OpusEncoderMono;
|
|
|
|
OpusCustomDecoder* OpusDecoderMono;
|
|
|
|
OpusCustomEncoder* OpusEncoderStereo;
|
|
|
|
OpusCustomDecoder* OpusDecoderStereo;
|
2020-04-12 21:36:50 +02:00
|
|
|
OpusCustomEncoder* CurOpusEncoder;
|
|
|
|
OpusCustomDecoder* CurOpusDecoder;
|
2013-02-16 19:06:18 +01:00
|
|
|
EAudComprType eAudioCompressionType;
|
2011-04-25 12:51:57 +02:00
|
|
|
int iCeltNumCodedBytes;
|
2020-04-12 22:10:53 +02:00
|
|
|
int iOPUSFrameSizeSamples;
|
2013-08-15 21:15:01 +02:00
|
|
|
EAudioQuality eAudioQuality;
|
2014-02-23 21:01:17 +01:00
|
|
|
EAudChanConf eAudioChannelConf;
|
2020-04-12 21:36:50 +02:00
|
|
|
int iNumAudioChannels;
|
2013-03-10 10:27:25 +01:00
|
|
|
bool bIsInitializationPhase;
|
2020-04-16 17:54:45 +02:00
|
|
|
bool bMuteOutStream;
|
2011-04-25 12:51:57 +02:00
|
|
|
CVector<unsigned char> vecCeltData;
|
|
|
|
|
2013-06-03 18:07:17 +02:00
|
|
|
CHighPrioSocket Socket;
|
2011-04-25 12:51:57 +02:00
|
|
|
CSound Sound;
|
|
|
|
CStereoSignalLevelMeter SignalLevelMeter;
|
|
|
|
|
|
|
|
CVector<uint8_t> vecbyNetwData;
|
|
|
|
|
|
|
|
int iAudioInFader;
|
|
|
|
bool bReverbOnLeftChan;
|
|
|
|
int iReverbLevel;
|
|
|
|
CAudioReverb AudioReverbL;
|
|
|
|
CAudioReverb AudioReverbR;
|
|
|
|
|
|
|
|
int iSndCrdPrefFrameSizeFactor;
|
|
|
|
int iSndCrdFrameSizeFactor;
|
|
|
|
|
|
|
|
bool bSndCrdConversionBufferRequired;
|
|
|
|
int iSndCardMonoBlockSizeSamConvBuff;
|
|
|
|
CBufferBase<int16_t> SndCrdConversionBufferIn;
|
|
|
|
CBufferBase<int16_t> SndCrdConversionBufferOut;
|
|
|
|
CVector<int16_t> vecDataConvBuf;
|
2020-04-16 17:54:45 +02:00
|
|
|
CVector<int16_t> vecsStereoSndCrdTMP;
|
2020-04-23 20:54:58 +02:00
|
|
|
CVector<int16_t> vecsStereoSndCrdMuteStream;
|
2020-04-16 17:54:45 +02:00
|
|
|
CVector<int16_t> vecZeros;
|
2011-04-25 12:51:57 +02:00
|
|
|
|
|
|
|
bool bFraSiFactPrefSupported;
|
|
|
|
bool bFraSiFactDefSupported;
|
|
|
|
bool bFraSiFactSafeSupported;
|
|
|
|
|
|
|
|
int iMonoBlockSizeSam;
|
|
|
|
int iStereoBlockSizeSam;
|
|
|
|
|
|
|
|
EGUIDesign eGUIDesign;
|
2020-03-30 22:36:25 +02:00
|
|
|
bool bDisplayChannelLevels;
|
2020-04-17 21:21:37 +02:00
|
|
|
bool bEnableOPUS64;
|
2011-04-25 12:51:57 +02:00
|
|
|
|
2014-01-03 09:54:49 +01:00
|
|
|
bool bJitterBufferOK;
|
|
|
|
|
2011-05-02 21:48:36 +02:00
|
|
|
QString strCentralServerAddress;
|
2020-04-11 14:27:50 +02:00
|
|
|
ECSAddType eCentralServerAddressType;
|
2011-05-02 21:48:36 +02:00
|
|
|
|
2011-05-27 22:29:37 +02:00
|
|
|
// server settings
|
|
|
|
int iServerSockBufNumFrames;
|
|
|
|
|
2011-04-25 12:51:57 +02:00
|
|
|
// for ping measurement
|
|
|
|
CPreciseTime PreciseTime;
|
|
|
|
|
|
|
|
public slots:
|
|
|
|
void OnSendProtMessage ( CVector<uint8_t> vecMessage );
|
2014-02-16 09:20:07 +01:00
|
|
|
void OnInvalidPacketReceived ( CHostAddress RecHostAddr );
|
|
|
|
|
|
|
|
void OnDetectedCLMessage ( CVector<uint8_t> vecbyMesBodyData,
|
|
|
|
int iRecID,
|
|
|
|
CHostAddress RecHostAddr );
|
|
|
|
|
2011-05-27 22:29:37 +02:00
|
|
|
void OnReqJittBufSize() { CreateServerJitterBufferMessage(); }
|
2011-05-28 14:17:01 +02:00
|
|
|
void OnJittBufSizeChanged ( int iNewJitBufSize );
|
2013-02-11 16:21:53 +01:00
|
|
|
void OnReqChanInfo() { Channel.SetRemoteInfo ( ChannelInfo ); }
|
2011-04-25 12:51:57 +02:00
|
|
|
void OnNewConnection();
|
2015-10-17 17:37:58 +02:00
|
|
|
void OnCLDisconnection ( CHostAddress InetAddr ) { if ( InetAddr == Channel.GetAddress() ) { Stop(); } }
|
2011-05-24 21:40:57 +02:00
|
|
|
void OnCLPingReceived ( CHostAddress InetAddr,
|
|
|
|
int iMs );
|
2011-04-25 12:51:57 +02:00
|
|
|
|
2014-02-16 09:20:07 +01:00
|
|
|
void OnSendCLProtMessage ( CHostAddress InetAddr,
|
|
|
|
CVector<uint8_t> vecMessage );
|
|
|
|
|
2011-04-25 12:51:57 +02:00
|
|
|
void OnCLPingWithNumClientsReceived ( CHostAddress InetAddr,
|
2011-05-23 21:06:02 +02:00
|
|
|
int iMs,
|
|
|
|
int iNumClients );
|
2011-04-25 12:51:57 +02:00
|
|
|
|
2012-01-30 20:08:40 +01:00
|
|
|
void OnSndCrdReinitRequest ( int iSndCrdResetType );
|
2011-04-25 12:51:57 +02:00
|
|
|
|
2020-03-29 23:42:04 +02:00
|
|
|
void OnCLChannelLevelListReceived ( CHostAddress InetAddr,
|
|
|
|
CVector<uint16_t> vecLevelList );
|
|
|
|
|
2011-04-25 12:51:57 +02:00
|
|
|
signals:
|
2013-02-11 16:21:53 +01:00
|
|
|
void ConClientListMesReceived ( CVector<CChannelInfo> vecChanInfo );
|
2011-04-25 12:51:57 +02:00
|
|
|
void ChatTextReceived ( QString strChatText );
|
2015-01-23 20:43:18 +01:00
|
|
|
void LicenceRequired ( ELicenceType eLicenceType );
|
2011-04-25 12:51:57 +02:00
|
|
|
void PingTimeReceived ( int iPingTime );
|
2014-02-16 09:20:07 +01:00
|
|
|
|
2011-04-25 12:51:57 +02:00
|
|
|
void CLServerListReceived ( CHostAddress InetAddr,
|
|
|
|
CVector<CServerInfo> vecServerInfo );
|
2014-02-16 09:20:07 +01:00
|
|
|
|
2015-12-09 16:50:30 +01:00
|
|
|
void CLConnClientsListMesReceived ( CHostAddress InetAddr,
|
|
|
|
CVector<CChannelInfo> vecChanInfo );
|
|
|
|
|
2011-04-25 12:51:57 +02:00
|
|
|
void CLPingTimeWithNumClientsReceived ( CHostAddress InetAddr,
|
2011-05-23 21:06:02 +02:00
|
|
|
int iPingTime,
|
|
|
|
int iNumClients );
|
2014-02-21 22:25:26 +01:00
|
|
|
|
2014-02-23 10:46:25 +01:00
|
|
|
#ifdef ENABLE_CLIENT_VERSION_AND_OS_DEBUGGING
|
2014-02-21 22:25:26 +01:00
|
|
|
void CLVersionAndOSReceived ( CHostAddress InetAddr,
|
|
|
|
COSUtil::EOpSystemType eOSType,
|
|
|
|
QString strVersion );
|
2014-02-23 10:46:25 +01:00
|
|
|
#endif
|
2014-02-21 22:25:26 +01:00
|
|
|
|
2020-03-29 23:42:04 +02:00
|
|
|
void CLChannelLevelListReceived ( CHostAddress InetAddr,
|
|
|
|
CVector<uint16_t> vecLevelList );
|
|
|
|
|
2011-04-25 12:51:57 +02:00
|
|
|
void Disconnected();
|
2019-01-12 13:59:16 +01:00
|
|
|
void ControllerInFaderLevel ( int iChannelIdx, int iValue );
|
2020-04-12 12:33:50 +02:00
|
|
|
void CentralServerAddressTypeChanged();
|
2011-04-25 12:51:57 +02:00
|
|
|
};
|