mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-05-04 17:30:12 +08:00
@@ -43,7 +43,8 @@ Client::Client(QObject *parent) :
|
||||
m_commands["inputdevices"] = std::bind(&Client::inputDevicesCmd, this, _1);
|
||||
m_commands["outputdevices"] = std::bind(&Client::outputDevicesCmd, 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)
|
||||
@@ -173,6 +174,20 @@ void Client::listCallsignsCmd(QTextStream &args)
|
||||
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()
|
||||
{
|
||||
std::cout << "Input squelch: " << m_voice->inputSquelch() << std::endl;
|
||||
|
||||
@@ -39,6 +39,8 @@ private: //commands
|
||||
void inputDevicesCmd(QTextStream &args);
|
||||
void outputDevicesCmd(QTextStream &args);
|
||||
void listCallsignsCmd(QTextStream &args);
|
||||
void enableLoopbackCmd(QTextStream &args);
|
||||
void disableLoopbackCmd(QTextStream &args);
|
||||
|
||||
void printLinePrefix();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user