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,
mReceiverPeerPort(receiver_peer_port),
mTcpServerPort(4464),
mRedundancy(redundancy),
mJackClientName("JackTrip"),
mJackClientName(gJackDefaultClientName),
mConnectionMode(JackTrip::NORMAL),
mReceivedConnection(false),
mTcpConnectionError(false),
......@@ -159,9 +159,10 @@ void JackTrip::setupAudio(
#ifdef WAIRTOMASTER // WAIR
qDebug() << "mPeerAddress" << mPeerAddress << mPeerAddress.contains(gDOMAIN_TRIPLE);
QString VARIABLE_AUDIO_NAME = WAIR_AUDIO_NAME; // legacy for WAIR
QByteArray tmp = QString(mPeerAddress).replace(":", ".").toLatin1();
if(mPeerAddress.toStdString()!="")
mJackClientName = tmp.constData();
//Set our Jack client name if we're a hub server or a custom name hasn't been set
if(mPeerAddress.toStdString()!="" && (mJackClientName == gJackDefaultClientName || mJackTripMode == SERVERPINGSERVER)) {
mJackClientName = QString(mPeerAddress).replace(":", ".").toLatin1().constData();
}
std::cout << "WAIR ID " << ID << " jacktrip client name set to=" <<
mJackClientName << std::endl;
......
......@@ -122,6 +122,7 @@ extern int gVerboseFlag; ///< Verbose mode flag declaration
/// \name JackAudio
//@{
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