merge fixes

This commit is contained in:
Volker Fischer 2020-04-30 22:03:01 +02:00
parent effa2c5bef
commit bac89e358a
11 changed files with 58 additions and 63 deletions

View file

@ -27,7 +27,7 @@
#include "sound.h"
#ifdef WITH_SOUND
void CSound::OpenJack(char* jackClientName)
void CSound::OpenJack ( const char* jackClientName )
{
jack_status_t JackStatus;

View file

@ -65,7 +65,9 @@ public:
const int iCtrlMIDIChannel,
const bool bNoAutoJackConnect,
const QString& strJackClientName ) :
CSoundBase ( "Jack", true, fpNewProcessCallback, arg, iCtrlMIDIChannel, bNoAutoJackConnect, strJackClientName ), iJACKBufferSizeMono ( 0 ) { OpenJack( strJackClientName.toLocal8Bit().data() ); }
CSoundBase ( "Jack", true, fpNewProcessCallback, arg, iCtrlMIDIChannel, bNoAutoJackConnect, strJackClientName ),
iJACKBufferSizeMono ( 0 ) { OpenJack ( strJackClientName.toLocal8Bit().data() ); }
virtual ~CSound() { CloseJack(); }
virtual int Init ( const int iNewPrefMonoBufferSize );
@ -85,7 +87,7 @@ public:
jack_port_t* input_port_midi;
protected:
void OpenJack(char* jackClientName);
void OpenJack ( const char* jackClientName );
void CloseJack();
// callbacks

View file

@ -30,7 +30,7 @@ CClient::CClient ( const quint16 iPortNumber,
const QString& strConnOnStartupAddress,
const int iCtrlMIDIChannel,
const bool bNoAutoJackConnect,
const QString& strClientName ) :
const QString& strNClientName ) :
vstrIPAddress ( MAX_NUM_SERVER_ADDR_ITEMS, "" ),
ChannelInfo (),
vecStoredFaderTags ( MAX_NUM_STORED_FADER_SETTINGS, "" ),
@ -60,7 +60,7 @@ CClient::CClient ( const quint16 iPortNumber,
bIsInitializationPhase ( true ),
bMuteOutStream ( false ),
Socket ( &Channel, iPortNumber ),
Sound ( AudioCallback, this, iCtrlMIDIChannel, bNoAutoJackConnect, strClientName ),
Sound ( AudioCallback, this, iCtrlMIDIChannel, bNoAutoJackConnect, strNClientName ),
iAudioInFader ( AUD_FADER_IN_MIDDLE ),
bReverbOnLeftChan ( false ),
iReverbLevel ( 0 ),
@ -78,11 +78,8 @@ CClient::CClient ( const quint16 iPortNumber,
strCentralServerAddress ( "" ),
eCentralServerAddressType ( AT_DEFAULT ),
iServerSockBufNumFrames ( DEF_NET_BUF_SIZE_NUM_BL ),
strClientName ( APP_NAME )
strClientName ( strNClientName )
{
SetClientName ( strClientName );
int iOpusError;
OpusMode = opus_custom_mode_create ( SYSTEM_SAMPLE_RATE_HZ,

View file

@ -108,18 +108,13 @@ public:
const QString& strConnOnStartupAddress,
const int iCtrlMIDIChannel,
const bool bNoAutoJackConnect,
const QString& strClientName );
const QString& strNClientName );
void Start();
void Stop();
bool IsRunning() { return Sound.IsRunning(); }
bool SetServerAddr ( QString strNAddr );
QString GetClientName() const { return this->strClientName; }
void SetClientName ( const QString& strClientName ) {
this->strClientName = strClientName;
}
double MicLeveldB_L() { return SignalLevelMeter.MicLeveldBLeft(); }
double MicLeveldB_R() { return SignalLevelMeter.MicLeveldBRight(); }
@ -288,6 +283,7 @@ public:
CVector<int> vecStoredFaderIsMute;
int iNewClientFaderLevel;
bool bConnectDlgShowAllMusicians;
QString strClientName;
// window position/state settings
QByteArray vecWindowPosMain;
@ -390,8 +386,6 @@ protected:
// for ping measurement
CPreciseTime PreciseTime;
QString strClientName;
public slots:
void OnSendProtMessage ( CVector<uint8_t> vecMessage );
void OnInvalidPacketReceived ( CHostAddress RecHostAddr );

View file

@ -809,17 +809,17 @@ void CClientDlg::SetMyWindowTitle ( const int iNumClients)
if ( iNumClients == 0 )
{
// only application name
setWindowTitle ( pClient->GetClientName() );
setWindowTitle ( pClient->strClientName );
}
else
{
if ( iNumClients == 1 )
{
setWindowTitle ( QString ( pClient->GetClientName() ) + " (1 user)" );
setWindowTitle ( QString ( pClient->strClientName ) + " (1 user)" );
}
else
{
setWindowTitle ( QString ( pClient->GetClientName() ) +
setWindowTitle ( QString ( pClient->strClientName ) +
QString ( " (%1 users)" ).arg ( iNumClients ) );
}
}

View file

@ -95,7 +95,6 @@ protected:
CClient* pClient;
CSettings* pSettings;
QString strClientName;
bool bConnected;
bool bConnectDlgWasShown;
QTimer TimerSigMet;

View file

@ -328,7 +328,22 @@ int main ( int argc, char** argv )
}
// HTML status file ----------------------------------------------------
// Client Name ---------------------------------------------------------
if ( GetStringArgument ( tsConsole,
argc,
argv,
i,
"--clientname",
"--clientname",
strArgument ) )
{
strClientName = QString ( APP_NAME ) + " " + strArgument;
tsConsole << "- client name: " << strClientName << endl;
continue;
}
// Server history file name --------------------------------------------
if ( GetStringArgument ( tsConsole,
argc,
argv,
@ -432,19 +447,6 @@ int main ( int argc, char** argv )
continue;
}
// Client Name ---------------------------------------------------------
if ( GetStringArgument ( tsConsole,
argc,
argv,
i,
"--clientname",
"--clientname",
strArgument ) )
{
strClientName = strArgument;
tsConsole << "- client name: " << strClientName << endl;
continue;
}
// Version number ------------------------------------------------------
if ( ( !strcmp ( argv[i], "--version" ) ) ||
@ -487,6 +489,7 @@ int main ( int argc, char** argv )
strCentralServer = DEFAULT_SERVER_ADDRESS;
}
// Application/GUI setup ---------------------------------------------------
// Application object
if ( !bUseGUI && !strHistoryFileName.isEmpty() )
@ -687,7 +690,7 @@ QString UsageArguments ( char **argv )
" -D, --histdays number of days of history to display (server only)\n"
" -z, --startminimized start minimizied (server only)\n"
" --ctrlmidich MIDI controller channel to listen (client only)\n"
" --clientname Jamulus client name (windows title and jack client name)\n"
" --clientname client name (window title and jack client name)\n"
"\nExample: " + QString ( argv[0] ) + " -l -inifile myinifile.ini\n";
}