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

Merge pull request #93 from jacktrip/custom-client-fix

Honour custom client names
parents 3fec5796 293c585e
......@@ -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),
......@@ -157,12 +157,13 @@ void JackTrip::setupAudio(
mAudioBitResolution);
#ifdef WAIRTOHUB // 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;
#endif // endwhere
mAudioInterface->setClientName(mJackClientName);
......
......@@ -123,6 +123,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