mirror of
https://github.com/overte-org/overte.git
synced 2025-06-20 11:20:17 +02:00
add a missing update of having heard from the audio-mixer
This commit is contained in:
parent
198b14310f
commit
6e9da9747e
1 changed files with 19 additions and 6 deletions
|
@ -45,16 +45,29 @@ void DatagramProcessor::processDatagrams() {
|
||||||
_byteCount += incomingPacket.size();
|
_byteCount += incomingPacket.size();
|
||||||
|
|
||||||
if (nodeList->packetVersionAndHashMatch(incomingPacket)) {
|
if (nodeList->packetVersionAndHashMatch(incomingPacket)) {
|
||||||
|
|
||||||
|
PacketType incomingType = packetTypeForPacket(incomingPacket);
|
||||||
// only process this packet if we have a match on the packet version
|
// only process this packet if we have a match on the packet version
|
||||||
switch (packetTypeForPacket(incomingPacket)) {
|
switch (incomingType) {
|
||||||
case PacketTypeMixedAudio:
|
case PacketTypeMixedAudio:
|
||||||
case PacketTypeSilentAudioFrame:
|
case PacketTypeSilentAudioFrame:
|
||||||
|
case PacketTypeAudioStreamStats:
|
||||||
|
if (incomingType != PacketTypeAudioStreamStats) {
|
||||||
QMetaObject::invokeMethod(&application->_audio, "addReceivedAudioToStream", Qt::QueuedConnection,
|
QMetaObject::invokeMethod(&application->_audio, "addReceivedAudioToStream", Qt::QueuedConnection,
|
||||||
Q_ARG(QByteArray, incomingPacket));
|
Q_ARG(QByteArray, incomingPacket));
|
||||||
break;
|
} else {
|
||||||
case PacketTypeAudioStreamStats:
|
|
||||||
QMetaObject::invokeMethod(&application->_audio, "parseAudioStreamStatsPacket", Qt::QueuedConnection,
|
QMetaObject::invokeMethod(&application->_audio, "parseAudioStreamStatsPacket", Qt::QueuedConnection,
|
||||||
Q_ARG(QByteArray, incomingPacket));
|
Q_ARG(QByteArray, incomingPacket));
|
||||||
|
}
|
||||||
|
|
||||||
|
// update having heard from the audio-mixer and record the bytes received
|
||||||
|
SharedNodePointer audioMixer = nodeList->sendingNodeForPacket(incomingPacket);
|
||||||
|
|
||||||
|
if (audioMixer) {
|
||||||
|
audioMixer->setLastHeardMicrostamp(usecTimestampNow());
|
||||||
|
audioMixer->recordBytesReceived(incomingPacket.size());
|
||||||
|
}
|
||||||
|
|
||||||
break;
|
break;
|
||||||
case PacketTypeParticleAddResponse:
|
case PacketTypeParticleAddResponse:
|
||||||
// this will keep creatorTokenIDs to IDs mapped correctly
|
// this will keep creatorTokenIDs to IDs mapped correctly
|
||||||
|
|
Loading…
Reference in a new issue