mirror of
https://github.com/overte-org/overte.git
synced 2025-07-23 14:04:23 +02:00
fix random stats sending for AudioMixer clients
This commit is contained in:
parent
33b46bd8e3
commit
1d256be7ee
2 changed files with 5 additions and 1 deletions
|
@ -189,6 +189,10 @@ void AudioMixerClientData::checkBuffersBeforeFrameSend() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool AudioMixerClientData::shouldSendStats(int frameNumber) {
|
||||||
|
return (frameNumber % (int) ceil(1.0f / AudioConstants::NETWORK_FRAME_SECS)) == _frameToSendStats;
|
||||||
|
}
|
||||||
|
|
||||||
void AudioMixerClientData::sendAudioStreamStatsPackets(const SharedNodePointer& destinationNode) {
|
void AudioMixerClientData::sendAudioStreamStatsPackets(const SharedNodePointer& destinationNode) {
|
||||||
|
|
||||||
auto nodeList = DependencyManager::get<NodeList>();
|
auto nodeList = DependencyManager::get<NodeList>();
|
||||||
|
|
|
@ -59,7 +59,7 @@ public:
|
||||||
quint16 getOutgoingSequenceNumber() const { return _outgoingMixedAudioSequenceNumber; }
|
quint16 getOutgoingSequenceNumber() const { return _outgoingMixedAudioSequenceNumber; }
|
||||||
|
|
||||||
// uses randomization to have the AudioMixer send a stats packet to this node around every second
|
// uses randomization to have the AudioMixer send a stats packet to this node around every second
|
||||||
bool shouldSendStats(int frameNumber) { return frameNumber % _frameToSendStats == 0; }
|
bool shouldSendStats(int frameNumber);
|
||||||
|
|
||||||
signals:
|
signals:
|
||||||
void injectorStreamFinished(const QUuid& streamIdentifier);
|
void injectorStreamFinished(const QUuid& streamIdentifier);
|
||||||
|
|
Loading…
Reference in a new issue