From 80f6fe22892ce346c6cf45da5d79a68cd26269ea Mon Sep 17 00:00:00 2001 From: Silvano Seva Date: Fri, 9 Sep 2022 08:22:34 +0200 Subject: [PATCH] Stopping audio codec at the and of each voice prompt --- openrtx/src/core/voicePrompts.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/openrtx/src/core/voicePrompts.c b/openrtx/src/core/voicePrompts.c index 856fa60e..90b72edc 100644 --- a/openrtx/src/core/voicePrompts.c +++ b/openrtx/src/core/voicePrompts.c @@ -295,10 +295,7 @@ void vp_terminate() if (voicePromptActive) { audio_disableAmp(); - codec_stop(); - - vpCurrentSequence.pos = 0; - voicePromptActive = false; + vp_flush(); } codec_terminate(); @@ -314,6 +311,8 @@ void vp_stop() vpCurrentSequence.pos = 0; vpCurrentSequence.c2DataIndex = 0; vpCurrentSequence.c2DataLength = 0; + codec_stop(); + // If any beep is playing, immediately stop it. if (currentBeepDuration > 0) platform_beepStop(); @@ -519,6 +518,7 @@ void vp_tick() vpCurrentSequence.pos = 0; vpCurrentSequence.c2DataIndex = 0; vpCurrentSequence.c2DataLength = 0; + codec_stop(); } }