reset the incoming audio seq stats in Application::nodeKilled when audiomixer is killed

This commit is contained in:
wangyix 2014-06-30 18:00:29 -07:00
parent 4abfd2b6b7
commit f51a77ce45
3 changed files with 7 additions and 0 deletions

View file

@ -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...

View file

@ -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) {

View file

@ -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();