From befdfc7ce6d33cfc3b6e7b44fb2052e6ef00dd54 Mon Sep 17 00:00:00 2001 From: Alex P Date: Tue, 18 Nov 2025 14:38:12 +0200 Subject: [PATCH] Fix type mismatch in ALSA error handler Change recovery_attempts from uint8_t to int to match handle_alsa_error signature and eliminate compiler warnings. --- internal/audio/c/audio.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/internal/audio/c/audio.c b/internal/audio/c/audio.c index 1df66f26..b85f8a82 100644 --- a/internal/audio/c/audio.c +++ b/internal/audio/c/audio.c @@ -535,8 +535,8 @@ __attribute__((hot)) int jetkvm_audio_read_encode(void * __restrict__ opus_buf) unsigned char * __restrict__ out = (unsigned char*)opus_buf; int32_t pcm_rc, nb_bytes; int32_t err = 0; - uint8_t recovery_attempts = 0; - const uint8_t max_recovery_attempts = 3; + int recovery_attempts = 0; + const int max_recovery_attempts = 3; if (__builtin_expect(capture_stop_requested, 0)) { return -1; @@ -708,8 +708,8 @@ __attribute__((hot)) int jetkvm_audio_decode_write(void * __restrict__ opus_buf, static short CACHE_ALIGN pcm_buffer[960 * 2]; // Cache-aligned unsigned char * __restrict__ in = (unsigned char*)opus_buf; int32_t pcm_frames, pcm_rc, err = 0; - uint8_t recovery_attempts = 0; - const uint8_t max_recovery_attempts = 3; + int recovery_attempts = 0; + const int max_recovery_attempts = 3; if (__builtin_expect(playback_stop_requested, 0)) { return -1;