kopia lustrzana https://gitlab.com/eliggett/wfview
Maybe fix audio crash?
rodzic
18646ab0cf
commit
1611058f77
|
@ -63,7 +63,6 @@ bool audioHandler::init(audioSetup setupIn)
|
|||
if (isInitialized) {
|
||||
return false;
|
||||
}
|
||||
qInfo(logAudio()) << (setup.isinput ? "Input" : "Output") << "audio handler starting:" << setup.name;
|
||||
|
||||
/*
|
||||
0x01 uLaw 1ch 8bit
|
||||
|
@ -77,6 +76,7 @@ bool audioHandler::init(audioSetup setupIn)
|
|||
setup = setupIn;
|
||||
setup.radioChan = 1;
|
||||
setup.bits = 8;
|
||||
qInfo(logAudio()) << (setup.isinput ? "Input" : "Output") << "audio handler starting:" << setup.name;
|
||||
|
||||
if (setup.codec == 0x01 || setup.codec == 0x20) {
|
||||
setup.ulaw = true;
|
||||
|
|
|
@ -8,6 +8,9 @@ udpServer::udpServer()
|
|||
|
||||
void udpServer::init(SERVERCONFIG conf, audioSetup out, audioSetup in)
|
||||
{
|
||||
|
||||
qInfo(logUdpServer()) << "Input audio device:" << in.name;
|
||||
qInfo(logUdpServer()) << "Output audio device:" << out.name;
|
||||
this->config = conf;
|
||||
this->outAudio = out;
|
||||
this->inAudio = in;
|
||||
|
@ -318,6 +321,7 @@ void udpServer::controlReceived()
|
|||
outAudio.codec = current->txCodec;
|
||||
outAudio.samplerate = current->txSampleRate;
|
||||
outAudio.latency = current->txBufferLen;
|
||||
outAudio.isinput = false;
|
||||
|
||||
txaudio = new audioHandler();
|
||||
txAudioThread = new QThread(this);
|
||||
|
@ -339,6 +343,7 @@ void udpServer::controlReceived()
|
|||
{
|
||||
inAudio.codec = current->rxCodec;
|
||||
inAudio.samplerate = current->rxSampleRate;
|
||||
inAudio.isinput = true;
|
||||
|
||||
rxaudio = new audioHandler();
|
||||
|
||||
|
|
|
@ -964,13 +964,15 @@ void wfmain::setServerToPrefs()
|
|||
|
||||
if (serverConfig.enabled) {
|
||||
serverConfig.lan = prefs.enableLAN;
|
||||
|
||||
qInfo(logAudio()) << "Audio Input device " << serverRxSetup.name;
|
||||
qInfo(logAudio()) << "Audio Output device " << serverTxSetup.name;
|
||||
udp = new udpServer();
|
||||
|
||||
serverThread = new QThread(this);
|
||||
|
||||
udp->moveToThread(serverThread);
|
||||
|
||||
|
||||
connect(this, SIGNAL(initServer(SERVERCONFIG, audioSetup, audioSetup)), udp, SLOT(init(SERVERCONFIG, audioSetup, audioSetup)));
|
||||
connect(serverThread, SIGNAL(finished()), udp, SLOT(deleteLater()));
|
||||
|
||||
|
@ -983,6 +985,7 @@ void wfmain::setServerToPrefs()
|
|||
emit initServer(serverConfig, serverTxSetup, serverRxSetup);
|
||||
|
||||
connect(this, SIGNAL(sendRigCaps(rigCapabilities)), udp, SLOT(receiveRigCaps(rigCapabilities)));
|
||||
|
||||
ui->statusBar->showMessage(QString("Server enabled"), 1000);
|
||||
|
||||
}
|
||||
|
|
Ładowanie…
Reference in New Issue