From e072624c8d0ece7e03be9558bf54d84d5655296a Mon Sep 17 00:00:00 2001 From: evgeny Date: Thu, 29 Oct 2026 01:38:11 +0100 Subject: [PATCH] Keep the host audio threshold API compatible with Android signatures --- .../src/main/kotlin/android/media/HostStreamAudio.kt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tools/chatgui-android/video-tests/src/main/kotlin/android/media/HostStreamAudio.kt b/tools/chatgui-android/video-tests/src/main/kotlin/android/media/HostStreamAudio.kt index b95bc064..6def7905 100644 --- a/tools/chatgui-android/video-tests/src/main/kotlin/android/media/HostStreamAudio.kt +++ b/tools/chatgui-android/video-tests/src/main/kotlin/android/media/HostStreamAudio.kt @@ -41,12 +41,12 @@ class AudioTrack { var playState = 0 private set val bufferSizeInFrames = 960 - var startThresholdInFrames = 1 - private set + private var threshold = 1 + val startThresholdInFrames get() = threshold var playbackHeadPosition = 0 private set val underrunCount = 0 - fun setStartThresholdInFrames(value: Int) { check("threshold" !in failures); startThresholdInFrames = value } + fun setStartThresholdInFrames(value: Int) { check("threshold" !in failures); threshold = value } fun write(pcm: ShortArray, offset: Int, count: Int, mode: Int): Int { check(!released); check("write" !in failures); playbackHeadPosition += count / 2; return count }