mirror of
https://github.com/overte-org/overte.git
synced 2025-08-09 12:28:02 +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);
|
_modelEditSender.nodeKilled(node);
|
||||||
|
|
||||||
if (node->getType() == NodeType::AudioMixer) {
|
if (node->getType() == NodeType::AudioMixer) {
|
||||||
QMetaObject::invokeMethod(&_audio, "resetIncomingMixedAudioSequenceNumberStats");
|
QMetaObject::invokeMethod(&_audio, "audioMixerKilled");
|
||||||
}
|
}
|
||||||
|
|
||||||
if (node->getType() == NodeType::VoxelServer) {
|
if (node->getType() == NodeType::VoxelServer) {
|
||||||
|
|
|
@ -152,11 +152,28 @@ void Audio::reset() {
|
||||||
_starveCount = 0;
|
_starveCount = 0;
|
||||||
_consecutiveNotMixedCount = 0;
|
_consecutiveNotMixedCount = 0;
|
||||||
|
|
||||||
|
_outgoingAvatarAudioSequenceNumber = 0;
|
||||||
|
|
||||||
|
resetStats();
|
||||||
|
}
|
||||||
|
|
||||||
|
void Audio::resetStats() {
|
||||||
_audioMixerAvatarStreamAudioStats = AudioStreamStats();
|
_audioMixerAvatarStreamAudioStats = AudioStreamStats();
|
||||||
_audioMixerInjectedStreamAudioStatsMap.clear();
|
_audioMixerInjectedStreamAudioStatsMap.clear();
|
||||||
|
|
||||||
_outgoingAvatarAudioSequenceNumber = 0;
|
|
||||||
_incomingMixedAudioSequenceNumberStats.reset();
|
_incomingMixedAudioSequenceNumberStats.reset();
|
||||||
|
|
||||||
|
_interframeTimeGapStats.reset();
|
||||||
|
|
||||||
|
_inputRingBufferFramesAvailableStats.reset();
|
||||||
|
|
||||||
|
_outputRingBufferFramesAvailableStats.reset();
|
||||||
|
_audioOutputBufferFramesAvailableStats.reset();
|
||||||
|
}
|
||||||
|
|
||||||
|
void Audio::audioMixerKilled() {
|
||||||
|
_outgoingAvatarAudioSequenceNumber = 0;
|
||||||
|
resetStats();
|
||||||
}
|
}
|
||||||
|
|
||||||
QAudioDeviceInfo getNamedAudioDeviceForMode(QAudio::Mode mode, const QString& deviceName) {
|
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 addSpatialAudioToBuffer(unsigned int sampleTime, const QByteArray& spatialAudio, unsigned int numSamples);
|
||||||
void handleAudioInput();
|
void handleAudioInput();
|
||||||
void reset();
|
void reset();
|
||||||
void resetIncomingMixedAudioSequenceNumberStats() { _incomingMixedAudioSequenceNumberStats.reset(); }
|
void resetStats();
|
||||||
|
void audioMixerKilled();
|
||||||
void toggleMute();
|
void toggleMute();
|
||||||
void toggleAudioNoiseReduction();
|
void toggleAudioNoiseReduction();
|
||||||
void toggleToneInjection();
|
void toggleToneInjection();
|
||||||
|
|
Loading…
Reference in a new issue