Send blank audio packet on disconnct

monitor
Phil Taylor 2022-07-05 10:31:45 +01:00
rodzic a9e9c80708
commit bcc16b8d29
1 zmienionych plików z 10 dodań i 0 usunięć

Wyświetl plik

@ -96,6 +96,16 @@ udpAudio::udpAudio(QHostAddress local, QHostAddress ip, quint16 audioPort, quint
udpAudio::~udpAudio()
{
// Send empty packet before deleting audio
audioPacket tempAudio;
QByteArray tempArray((const char *)'\0', 1920);
tempAudio.seq = 0;
tempAudio.time = lastReceived;
tempAudio.sent = 0;
tempAudio.data = tempArray;
emit haveAudioData(tempAudio);
if (pingTimer != Q_NULLPTR)
{
qDebug(logUdp()) << "Stopping pingTimer";