mirror of
https://github.com/overte-org/overte.git
synced 2025-08-05 06:49:41 +02:00
Audio stats now reset when AudioMixer is killed
This commit is contained in:
parent
f6ef61e76a
commit
847bc28990
3 changed files with 21 additions and 3 deletions
|
@ -3338,7 +3338,7 @@ void Application::nodeKilled(SharedNodePointer node) {
|
|||
_modelEditSender.nodeKilled(node);
|
||||
|
||||
if (node->getType() == NodeType::AudioMixer) {
|
||||
QMetaObject::invokeMethod(&_audio, "resetIncomingMixedAudioSequenceNumberStats");
|
||||
QMetaObject::invokeMethod(&_audio, "audioMixerKilled");
|
||||
}
|
||||
|
||||
if (node->getType() == NodeType::VoxelServer) {
|
||||
|
|
|
@ -152,11 +152,28 @@ void Audio::reset() {
|
|||
_starveCount = 0;
|
||||
_consecutiveNotMixedCount = 0;
|
||||
|
||||
_outgoingAvatarAudioSequenceNumber = 0;
|
||||
|
||||
resetStats();
|
||||
}
|
||||
|
||||
void Audio::resetStats() {
|
||||
_audioMixerAvatarStreamAudioStats = AudioStreamStats();
|
||||
_audioMixerInjectedStreamAudioStatsMap.clear();
|
||||
|
||||
_outgoingAvatarAudioSequenceNumber = 0;
|
||||
_incomingMixedAudioSequenceNumberStats.reset();
|
||||
|
||||
_interframeTimeGapStats.reset();
|
||||
|
||||
_inputRingBufferFramesAvailableStats.reset();
|
||||
|
||||
_outputRingBufferFramesAvailableStats.reset();
|
||||
_audioOutputBufferFramesAvailableStats.reset();
|
||||
}
|
||||
|
||||
void Audio::audioMixerKilled() {
|
||||
_outgoingAvatarAudioSequenceNumber = 0;
|
||||
resetStats();
|
||||
}
|
||||
|
||||
QAudioDeviceInfo getNamedAudioDeviceForMode(QAudio::Mode mode, const QString& deviceName) {
|
||||
|
|
|
@ -93,7 +93,8 @@ public slots:
|
|||
void addSpatialAudioToBuffer(unsigned int sampleTime, const QByteArray& spatialAudio, unsigned int numSamples);
|
||||
void handleAudioInput();
|
||||
void reset();
|
||||
void resetIncomingMixedAudioSequenceNumberStats() { _incomingMixedAudioSequenceNumberStats.reset(); }
|
||||
void resetStats();
|
||||
void audioMixerKilled();
|
||||
void toggleMute();
|
||||
void toggleAudioNoiseReduction();
|
||||
void toggleToneInjection();
|
||||
|
|
Loading…
Reference in a new issue