mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-23 13:55:36 +08:00
@@ -43,7 +43,8 @@ Client::Client(QObject *parent) :
|
|||||||
m_commands["inputdevices"] = std::bind(&Client::inputDevicesCmd, this, _1);
|
m_commands["inputdevices"] = std::bind(&Client::inputDevicesCmd, this, _1);
|
||||||
m_commands["outputdevices"] = std::bind(&Client::outputDevicesCmd, this, _1);
|
m_commands["outputdevices"] = std::bind(&Client::outputDevicesCmd, this, _1);
|
||||||
m_commands["users"] = std::bind(&Client::listCallsignsCmd, this, _1);
|
m_commands["users"] = std::bind(&Client::listCallsignsCmd, this, _1);
|
||||||
|
m_commands["enableloopback"] = std::bind(&Client::enableLoopbackCmd, this, _1);
|
||||||
|
m_commands["disableloopback"] = std::bind(&Client::disableLoopbackCmd, this, _1);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Client::command(QString line)
|
void Client::command(QString line)
|
||||||
@@ -173,6 +174,20 @@ void Client::listCallsignsCmd(QTextStream &args)
|
|||||||
printLinePrefix();
|
printLinePrefix();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void Client::enableLoopbackCmd(QTextStream &/*args*/)
|
||||||
|
{
|
||||||
|
std::cout << "Enabling audio loopback." << std::endl;
|
||||||
|
m_voice->enableAudioLoopback(true);
|
||||||
|
printLinePrefix();
|
||||||
|
}
|
||||||
|
|
||||||
|
void Client::disableLoopbackCmd(QTextStream &/*args*/)
|
||||||
|
{
|
||||||
|
std::cout << "Disabling audio loopback." << std::endl;
|
||||||
|
m_voice->enableAudioLoopback(false);
|
||||||
|
printLinePrefix();
|
||||||
|
}
|
||||||
|
|
||||||
void Client::onSquelchTestFinished()
|
void Client::onSquelchTestFinished()
|
||||||
{
|
{
|
||||||
std::cout << "Input squelch: " << m_voice->inputSquelch() << std::endl;
|
std::cout << "Input squelch: " << m_voice->inputSquelch() << std::endl;
|
||||||
|
|||||||
@@ -39,6 +39,8 @@ private: //commands
|
|||||||
void inputDevicesCmd(QTextStream &args);
|
void inputDevicesCmd(QTextStream &args);
|
||||||
void outputDevicesCmd(QTextStream &args);
|
void outputDevicesCmd(QTextStream &args);
|
||||||
void listCallsignsCmd(QTextStream &args);
|
void listCallsignsCmd(QTextStream &args);
|
||||||
|
void enableLoopbackCmd(QTextStream &args);
|
||||||
|
void disableLoopbackCmd(QTextStream &args);
|
||||||
|
|
||||||
void printLinePrefix();
|
void printLinePrefix();
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user