From e1a779156182fcd5da12f1e472f10baf8c32b0e3 Mon Sep 17 00:00:00 2001 From: Andreas Eversberg Date: Fri, 5 Apr 2024 22:24:12 +0200 Subject: [PATCH] Fix playing anouncements and tones with libmobile This is a fixup of the new audio processing. Without this patch you will hear only noisy tones. --- src/libmobile/call.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/libmobile/call.c b/src/libmobile/call.c index eb7c862..69f1627 100644 --- a/src/libmobile/call.c +++ b/src/libmobile/call.c @@ -664,7 +664,8 @@ void call_clock(void) #endif /* encode and send via RTP */ process->codec->encoder((uint8_t *)spl, 160 * 2, &payload, &payload_len, process); - osmo_cc_rtp_send(process->codec, (uint8_t *)spl, 160 * 2, 0, 1, 160); + osmo_cc_rtp_send(process->codec, payload, payload_len, 0, 1, 160); + free(payload); /* don't destroy process here in case of an error */ } process = process->next;