Stopping audio codec at the and of each voice prompt

This commit is contained in:
Silvano Seva 2022-09-09 08:22:34 +02:00
parent 0298aa897b
commit 80f6fe2289
1 changed files with 4 additions and 4 deletions

View File

@ -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();
}
}