Reporting audio device underrun counter

Bug: webrtc:10884
Change-Id: I35636fcbc1e2a19a89242379cdff6ec5c12fd21a
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/149200
Reviewed-by: Henrik Andreassson <henrika@webrtc.org>
Commit-Queue: Alex Narest <alexnarest@google.com>
Cr-Commit-Position: refs/heads/master@{#28874}
This commit is contained in:
Alex Narest
2019-08-16 11:49:04 +02:00
committed by Commit Bot
parent 9b29d69650
commit bbeb10925e
24 changed files with 96 additions and 0 deletions

View File

@ -342,6 +342,19 @@ class WebRtcAudioTrack {
return audioManager.getStreamVolume(AudioManager.STREAM_VOICE_CALL);
}
@CalledByNative
private int GetPlayoutUnderrunCount() {
if (Build.VERSION.SDK_INT >= 24) {
if (audioTrack != null) {
return audioTrack.getUnderrunCount();
} else {
return -1;
}
} else {
return -2;
}
}
private void logMainParameters() {
Logging.d(TAG,
"AudioTrack: "