kopia lustrzana https://gitlab.com/eliggett/wfview
Try using slot for audio again
rodzic
0cc2945d28
commit
04526db635
|
@ -346,7 +346,7 @@ void udpHandler::dataReceived()
|
||||||
audio = new udpAudio(localIP, radioIP, audioPort, rxSetup, txSetup);
|
audio = new udpAudio(localIP, radioIP, audioPort, rxSetup, txSetup);
|
||||||
|
|
||||||
QObject::connect(civ, SIGNAL(receive(QByteArray)), this, SLOT(receiveFromCivStream(QByteArray)));
|
QObject::connect(civ, SIGNAL(receive(QByteArray)), this, SLOT(receiveFromCivStream(QByteArray)));
|
||||||
//QObject::connect(audio, SIGNAL(haveAudioData(audioPacket)), this, SLOT(receiveAudioData(audioPacket)));
|
QObject::connect(audio, SIGNAL(haveAudioData(audioPacket)), this, SLOT(receiveAudioData(audioPacket)));
|
||||||
QObject::connect(this, SIGNAL(haveChangeLatency(quint16)), audio, SLOT(changeLatency(quint16)));
|
QObject::connect(this, SIGNAL(haveChangeLatency(quint16)), audio, SLOT(changeLatency(quint16)));
|
||||||
QObject::connect(this, SIGNAL(haveSetVolume(unsigned char)), audio, SLOT(setVolume(unsigned char)));
|
QObject::connect(this, SIGNAL(haveSetVolume(unsigned char)), audio, SLOT(setVolume(unsigned char)));
|
||||||
|
|
||||||
|
@ -740,7 +740,7 @@ udpAudio::udpAudio(QHostAddress local, QHostAddress ip, quint16 audioPort, audio
|
||||||
connect(this, SIGNAL(setupRxAudio(audioSetup)), rxaudio, SLOT(init(audioSetup)));
|
connect(this, SIGNAL(setupRxAudio(audioSetup)), rxaudio, SLOT(init(audioSetup)));
|
||||||
|
|
||||||
// signal/slot not currently used.
|
// signal/slot not currently used.
|
||||||
//connect(this, SIGNAL(haveAudioData(audioPacket)), rxaudio, SLOT(incomingAudio(audioPacket)));
|
connect(this, SIGNAL(haveAudioData(audioPacket)), rxaudio, SLOT(incomingAudio(audioPacket)));
|
||||||
connect(this, SIGNAL(haveChangeLatency(quint16)), rxaudio, SLOT(changeLatency(quint16)));
|
connect(this, SIGNAL(haveChangeLatency(quint16)), rxaudio, SLOT(changeLatency(quint16)));
|
||||||
connect(this, SIGNAL(haveSetVolume(unsigned char)), rxaudio, SLOT(setVolume(unsigned char)));
|
connect(this, SIGNAL(haveSetVolume(unsigned char)), rxaudio, SLOT(setVolume(unsigned char)));
|
||||||
connect(rxAudioThread, SIGNAL(finished()), rxaudio, SLOT(deleteLater()));
|
connect(rxAudioThread, SIGNAL(finished()), rxaudio, SLOT(deleteLater()));
|
||||||
|
@ -945,8 +945,8 @@ void udpAudio::dataReceived()
|
||||||
tempAudio.data = r.mid(0x18);
|
tempAudio.data = r.mid(0x18);
|
||||||
// Prefer signal/slot to forward audio as it is thread/safe
|
// Prefer signal/slot to forward audio as it is thread/safe
|
||||||
// Need to do more testing but latency appears fine.
|
// Need to do more testing but latency appears fine.
|
||||||
rxaudio->incomingAudio(tempAudio);
|
//rxaudio->incomingAudio(tempAudio);
|
||||||
//emit haveAudioData(tempAudio);
|
emit haveAudioData(tempAudio);
|
||||||
audioLatency = rxaudio->getLatency();
|
audioLatency = rxaudio->getLatency();
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
|
@ -670,8 +670,8 @@ void udpServer::audioReceived()
|
||||||
tempAudio.sent = 0;
|
tempAudio.sent = 0;
|
||||||
tempAudio.data = r.mid(0x18);
|
tempAudio.data = r.mid(0x18);
|
||||||
//qInfo(logUdpServer()) << "sending tx audio " << in->seq;
|
//qInfo(logUdpServer()) << "sending tx audio " << in->seq;
|
||||||
//emit haveAudioData(tempAudio);
|
emit haveAudioData(tempAudio);
|
||||||
txaudio->incomingAudio(tempAudio);
|
//txaudio->incomingAudio(tempAudio);
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Ładowanie…
Reference in New Issue