diff --git a/interface/src/Application.cpp b/interface/src/Application.cpp index a032fa7ea0..a024b3f429 100644 --- a/interface/src/Application.cpp +++ b/interface/src/Application.cpp @@ -3291,6 +3291,10 @@ void Application::nodeKilled(SharedNodePointer node) { _particleEditSender.nodeKilled(node); _modelEditSender.nodeKilled(node); + if (node->getType() == NodeType::AudioMixer) { + QMetaObject::invokeMethod(&_audio, "resetIncomingMixedAudioSequenceNumberStats"); + } + if (node->getType() == NodeType::VoxelServer) { QUuid nodeUUID = node->getUUID(); // see if this is the first we've heard of this node... diff --git a/interface/src/Audio.cpp b/interface/src/Audio.cpp index c52e2128b0..cda7e2b230 100644 --- a/interface/src/Audio.cpp +++ b/interface/src/Audio.cpp @@ -121,6 +121,8 @@ void Audio::init(QGLWidget *parent) { void Audio::reset() { _ringBuffer.reset(); _outgoingAvatarAudioSequenceNumber = 0; + _audioMixerInjectedStreamStatsMap.clear(); + _incomingMixedAudioSequenceNumberStats.reset(); } QAudioDeviceInfo getNamedAudioDeviceForMode(QAudio::Mode mode, const QString& deviceName) { diff --git a/interface/src/Audio.h b/interface/src/Audio.h index e6c72f587e..9f04e5cb03 100644 --- a/interface/src/Audio.h +++ b/interface/src/Audio.h @@ -83,6 +83,7 @@ public slots: void addSpatialAudioToBuffer(unsigned int sampleTime, const QByteArray& spatialAudio, unsigned int numSamples); void handleAudioInput(); void reset(); + void resetIncomingMixedAudioSequenceNumberStats() { _incomingMixedAudioSequenceNumberStats.reset(); } void toggleMute(); void toggleAudioNoiseReduction(); void toggleToneInjection();