From b86028ae068b8a3d5bb67c73c1f1b51f1b00e38d Mon Sep 17 00:00:00 2001 From: Patrick Nicolas Date: Sun, 14 Jul 2024 21:53:16 +0200 Subject: [PATCH] More tweaking of audio discard constants --- client/audio/android/audio.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/client/audio/android/audio.cpp b/client/audio/android/audio.cpp index e39de473..08d6f759 100644 --- a/client/audio/android/audio.cpp +++ b/client/audio/android/audio.cpp @@ -85,8 +85,8 @@ int32_t wivrn::android::audio::speaker_data_cb(AAudioStream * stream, void * use } } - // If we have more than 80ms of buffered data, discard some data - if (self->buffer_size_bytes > frame_size * AAudioStream_getSampleRate(stream) * 0.08) + // If we have more than 100ms of buffered data, discard some data + if (self->buffer_size_bytes > frame_size * AAudioStream_getSampleRate(stream) * 0.1) { // discard excess data until we only have 60ms left size_t target_buffer_size = frame_size * AAudioStream_getSampleRate(stream) * 0.06;