Unverified Commit a21cae5c authored by Aaron Wyatt's avatar Aaron Wyatt Committed by GitHub
Browse files

Honour custom client names

Reupload of a partial fix for #73 to isolate them from the more substantial changes that have since occurred in my branch.
parent 65e789a1
...@@ -106,7 +106,7 @@ JackTrip::JackTrip(jacktripModeT JacktripMode, ...@@ -106,7 +106,7 @@ JackTrip::JackTrip(jacktripModeT JacktripMode,
mReceiverPeerPort(receiver_peer_port), mReceiverPeerPort(receiver_peer_port),
mTcpServerPort(4464), mTcpServerPort(4464),
mRedundancy(redundancy), mRedundancy(redundancy),
mJackClientName("JackTrip"), mJackClientName(gJackDefaultClientName),
mConnectionMode(JackTrip::NORMAL), mConnectionMode(JackTrip::NORMAL),
mReceivedConnection(false), mReceivedConnection(false),
mTcpConnectionError(false), mTcpConnectionError(false),
...@@ -159,9 +159,10 @@ void JackTrip::setupAudio( ...@@ -159,9 +159,10 @@ void JackTrip::setupAudio(
#ifdef WAIRTOMASTER // WAIR #ifdef WAIRTOMASTER // WAIR
qDebug() << "mPeerAddress" << mPeerAddress << mPeerAddress.contains(gDOMAIN_TRIPLE); qDebug() << "mPeerAddress" << mPeerAddress << mPeerAddress.contains(gDOMAIN_TRIPLE);
QString VARIABLE_AUDIO_NAME = WAIR_AUDIO_NAME; // legacy for WAIR QString VARIABLE_AUDIO_NAME = WAIR_AUDIO_NAME; // legacy for WAIR
QByteArray tmp = QString(mPeerAddress).replace(":", ".").toLatin1(); //Set our Jack client name if we're a hub server or a custom name hasn't been set
if(mPeerAddress.toStdString()!="") if(mPeerAddress.toStdString()!="" && (mJackClientName == gJackDefaultClientName || mJackTripMode == SERVERPINGSERVER)) {
mJackClientName = tmp.constData(); mJackClientName = QString(mPeerAddress).replace(":", ".").toLatin1().constData();
}
std::cout << "WAIR ID " << ID << " jacktrip client name set to=" << std::cout << "WAIR ID " << ID << " jacktrip client name set to=" <<
mJackClientName << std::endl; mJackClientName << std::endl;
......
...@@ -122,6 +122,7 @@ extern int gVerboseFlag; ///< Verbose mode flag declaration ...@@ -122,6 +122,7 @@ extern int gVerboseFlag; ///< Verbose mode flag declaration
/// \name JackAudio /// \name JackAudio
//@{ //@{
const int gJackBitResolution = 32; ///< Audio Bit Resolution of the Jack Server const int gJackBitResolution = 32; ///< Audio Bit Resolution of the Jack Server
const char* const gJackDefaultClientName = "JackTrip";
//@} //@}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment