From 078c30b6967ba580d4d53d94f71778511ce2e890 Mon Sep 17 00:00:00 2001 From: David Rowe Date: Sat, 7 Dec 2019 08:28:53 +1300 Subject: [PATCH] Add Stats.audioInboundPPS property and signal And deprecate misnamed originals. --- interface/src/ui/Stats.cpp | 2 ++ interface/src/ui/Stats.h | 18 +++++++++++++++++- 2 files changed, 19 insertions(+), 1 deletion(-) diff --git a/interface/src/ui/Stats.cpp b/interface/src/ui/Stats.cpp index ba75b38bfc..bbf22f9549 100644 --- a/interface/src/ui/Stats.cpp +++ b/interface/src/ui/Stats.cpp @@ -261,6 +261,7 @@ void Stats::updateStats(bool force) { STAT_UPDATE(audioMixerInPps, audioMixerNode->getInboundPPS()); STAT_UPDATE(audioMixerOutKbps, (int)roundf(audioMixerNode->getOutboundKbps())); STAT_UPDATE(audioMixerOutPps, audioMixerNode->getOutboundPPS()); + STAT_UPDATE(audioInboundPPS, (int)audioClient->getAudioInboundPPS()); STAT_UPDATE(audioAudioInboundPPS, (int)audioClient->getAudioInboundPPS()); STAT_UPDATE(audioSilentInboundPPS, (int)audioClient->getSilentInboundPPS()); STAT_UPDATE(audioOutboundPPS, (int)audioClient->getAudioOutboundPPS()); @@ -274,6 +275,7 @@ void Stats::updateStats(bool force) { STAT_UPDATE(audioMixerOutPps, -1); STAT_UPDATE(audioOutboundPPS, -1); STAT_UPDATE(audioSilentOutboundPPS, -1); + STAT_UPDATE(audioInboundPPS, -1); STAT_UPDATE(audioAudioInboundPPS, -1); STAT_UPDATE(audioSilentInboundPPS, -1); } diff --git a/interface/src/ui/Stats.h b/interface/src/ui/Stats.h index 794d1c8eb3..e86888f1b6 100644 --- a/interface/src/ui/Stats.h +++ b/interface/src/ui/Stats.h @@ -174,10 +174,16 @@ private: \ * second. * -1 if not connected to an audio mixer. * Read-only. - * @property {number} audioAudioInboundPPS - The number of non-silent audio packets being received by the user, in packets per + * @property {number} audioInboundPPS - The number of non-silent audio packets being received by the user, in packets per * second. * -1 if not connected to an audio mixer. * Read-only. + * @property {number} audioAudioInboundPPS - The number of non-silent audio packets being received by the user, in packets per + * second. + * -1 if not connected to an audio mixer. + * Read-only. + *

Deprecated: This property is deprecated and will be removed. Use audioInboundPPS + * instead.

* @property {number} audioSilentInboundPPS - The number of silent audio packets being received by the user, in packets per * second. * -1 if not connected to an audio mixer. @@ -506,6 +512,7 @@ class Stats : public QQuickItem { STATS_PROPERTY(int, audioMixerPps, 0) STATS_PROPERTY(int, audioOutboundPPS, 0) STATS_PROPERTY(int, audioSilentOutboundPPS, 0) + STATS_PROPERTY(int, audioInboundPPS, 0) STATS_PROPERTY(int, audioAudioInboundPPS, 0) STATS_PROPERTY(int, audioSilentInboundPPS, 0) STATS_PROPERTY(int, audioPacketLoss, 0) @@ -992,10 +999,19 @@ signals: */ void audioSilentOutboundPPSChanged(); + /**jsdoc + * Triggered when the value of the audioInboundPPS property changes. + * @function Stats.audioInboundPPSChanged + * @returns {Signal} + */ + void audioInboundPPSChanged(); + /**jsdoc * Triggered when the value of the audioAudioInboundPPS property changes. * @function Stats.audioAudioInboundPPSChanged * @returns {Signal} + * @deprecated This signal is deprecated and will be removed. Use + * {@link Stats.audioInboundPPSChanged|audioInboundPPSChanged} instead. */ void audioAudioInboundPPSChanged();