merge fixes
This commit is contained in:
parent
effa2c5bef
commit
bac89e358a
11 changed files with 58 additions and 63 deletions
|
@ -26,11 +26,11 @@
|
|||
|
||||
|
||||
/* Implementation *************************************************************/
|
||||
CSound::CSound ( void (*fpNewProcessCallback) ( CVector<short>& psData, void* arg ),
|
||||
void* arg,
|
||||
const int iCtrlMIDIChannel,
|
||||
const bool bNoAutoJackConnect,
|
||||
const QString& strJackClientName ) :
|
||||
CSound::CSound ( void (*fpNewProcessCallback) ( CVector<short>& psData, void* arg ),
|
||||
void* arg,
|
||||
const int iCtrlMIDIChannel,
|
||||
const bool bNoAutoJackConnect,
|
||||
const QString& strJackClientName ) :
|
||||
CSoundBase ( "OpenSL", true, fpNewProcessCallback, arg, iCtrlMIDIChannel, bNoAutoJackConnect, strJackClientName )
|
||||
{
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
|
|
@ -60,12 +60,14 @@
|
|||
class CSound : public CSoundBase
|
||||
{
|
||||
public:
|
||||
CSound ( void (*fpNewProcessCallback) ( CVector<short>& psData, void* arg ),
|
||||
void* arg,
|
||||
const int iCtrlMIDIChannel,
|
||||
const bool bNoAutoJackConnect,
|
||||
const QString& strJackClientName ) :
|
||||
CSoundBase ( "Jack", true, fpNewProcessCallback, arg, iCtrlMIDIChannel, bNoAutoJackConnect, strJackClientName ), iJACKBufferSizeMono ( 0 ) { OpenJack( strJackClientName.toLocal8Bit().data() ); }
|
||||
CSound ( void (*fpNewProcessCallback) ( CVector<short>& psData, void* arg ),
|
||||
void* arg,
|
||||
const int iCtrlMIDIChannel,
|
||||
const bool bNoAutoJackConnect,
|
||||
const QString& strJackClientName ) :
|
||||
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
|
||||
|
|
10
mac/sound.h
10
mac/sound.h
|
@ -36,11 +36,11 @@
|
|||
class CSound : public CSoundBase
|
||||
{
|
||||
public:
|
||||
CSound ( void (*fpNewProcessCallback) ( CVector<short>& psData, void* arg ),
|
||||
void* arg,
|
||||
const int iCtrlMIDIChannel,
|
||||
const bool bNoAutoJackConnect,
|
||||
const QString& strJackClientName );
|
||||
CSound ( void (*fpNewProcessCallback) ( CVector<short>& psData, void* arg ),
|
||||
void* arg,
|
||||
const int iCtrlMIDIChannel,
|
||||
const bool bNoAutoJackConnect,
|
||||
const QString& strJackClientName );
|
||||
|
||||
virtual int Init ( const int iNewPrefMonoBufferSize );
|
||||
virtual void Start();
|
||||
|
|
|
@ -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,
|
||||
|
|
10
src/client.h
10
src/client.h
|
@ -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 );
|
||||
|
|
|
@ -802,24 +802,24 @@ void CClientDlg::OnNumClientsChanged ( int iNewNumClients )
|
|||
SetMyWindowTitle ( iNewNumClients );
|
||||
}
|
||||
|
||||
void CClientDlg::SetMyWindowTitle ( const int iNumClients)
|
||||
void CClientDlg::SetMyWindowTitle ( const int iNumClients )
|
||||
{
|
||||
// show number of connected clients in window title (and therefore also in
|
||||
// the task bar of the OS)
|
||||
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 ) );
|
||||
}
|
||||
}
|
||||
|
|
|
@ -95,7 +95,6 @@ protected:
|
|||
CClient* pClient;
|
||||
CSettings* pSettings;
|
||||
|
||||
QString strClientName;
|
||||
bool bConnected;
|
||||
bool bConnectDlgWasShown;
|
||||
QTimer TimerSigMet;
|
||||
|
|
33
src/main.cpp
33
src/main.cpp
|
@ -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";
|
||||
}
|
||||
|
||||
|
|
|
@ -483,12 +483,12 @@ void CSound::Stop()
|
|||
}
|
||||
}
|
||||
|
||||
CSound::CSound ( void (*fpNewCallback) ( CVector<int16_t>& psData, void* arg ),
|
||||
void* arg,
|
||||
const int iCtrlMIDIChannel,
|
||||
const bool bNoAutoJackConnect,
|
||||
const QString& strJackClientName ) :
|
||||
CSoundBase ( "ASIO", true, fpNewCallback, arg, iCtrlMIDIChannel, bNoAutoJackConnect, strJackClientName ),
|
||||
CSound::CSound ( void (*fpNewCallback) ( CVector<int16_t>& psData, void* arg ),
|
||||
void* arg,
|
||||
const int iCtrlMIDIChannel,
|
||||
const bool bNoAutoJackConnect,
|
||||
const QString& strJackClientName ) :
|
||||
CSoundBase ( "ASIO", true, fpNewCallback, arg, iCtrlMIDIChannel, bNoAutoJackConnect, strJackClientName ),
|
||||
lNumInChan ( 0 ),
|
||||
lNumInChanPlusAddChan ( 0 ),
|
||||
lNumOutChan ( 0 ),
|
||||
|
|
|
@ -46,11 +46,11 @@
|
|||
class CSound : public CSoundBase
|
||||
{
|
||||
public:
|
||||
CSound ( void (*fpNewCallback) ( CVector<int16_t>& psData, void* arg ),
|
||||
void* arg,
|
||||
const int iCtrlMIDIChannel,
|
||||
const bool bNoAutoJackConnect,
|
||||
const QString& strJackClientName );
|
||||
CSound ( void (*fpNewCallback) ( CVector<int16_t>& psData, void* arg ),
|
||||
void* arg,
|
||||
const int iCtrlMIDIChannel,
|
||||
const bool bNoAutoJackConnect,
|
||||
const QString& strJackClientName );
|
||||
|
||||
virtual ~CSound() { UnloadCurrentDriver(); }
|
||||
|
||||
|
|
Loading…
Reference in a new issue