mirror of
https://github.com/overte-org/overte.git
synced 2025-04-21 19:04:32 +02:00
Check we have an AM before sending packet
This commit is contained in:
parent
312780a2f6
commit
5a5a396b62
1 changed files with 5 additions and 2 deletions
|
@ -102,6 +102,10 @@ void AudioIOStats::sendDownstreamAudioStatsPacket() {
|
|||
_receivedAudioStream->perSecondCallbackForUpdatingStats();
|
||||
|
||||
auto nodeList = DependencyManager::get<NodeList>();
|
||||
SharedNodePointer audioMixer = nodeList->soloNodeOfType(NodeType::AudioMixer);
|
||||
if (!audioMixer) {
|
||||
return;
|
||||
}
|
||||
|
||||
quint8 appendFlag = 0;
|
||||
quint16 numStreamStatsToPack = 1;
|
||||
|
@ -118,8 +122,7 @@ void AudioIOStats::sendDownstreamAudioStatsPacket() {
|
|||
|
||||
// pack downstream audio stream stats
|
||||
statsPacket->writePrimitive(stats);
|
||||
|
||||
|
||||
// send packet
|
||||
SharedNodePointer audioMixer = nodeList->soloNodeOfType(NodeType::AudioMixer);
|
||||
nodeList->sendPacket(std::move(statsPacket), *audioMixer);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue