From fa6b6b6c2d53b5bd93ffa92b6d13b3ff21c71ea7 Mon Sep 17 00:00:00 2001 From: Solomon Peachy Date: Thu, 20 Jun 2024 17:38:39 -0400 Subject: talk: Don't kill the talk engine after voicing the "invalid voice" clip Unfortunately, this brings us back to the "Default" behavior of simply not voicing talk clips at all if there's no voice file. Change-Id: I457ec4e3fcefaaffcbf6222fe01617bf0903518c --- apps/talk.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/apps/talk.c b/apps/talk.c index ddc95e697b..2e73001c46 100644 --- a/apps/talk.c +++ b/apps/talk.c @@ -5,7 +5,6 @@ * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < < * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \ * \/ \/ \/ \/ \/ - * $Id$ * * Copyright (C) 2004 Jörg Hohensohn * @@ -1080,6 +1079,7 @@ static int _talk_file(const char* filename, /* reload needed? */ if (talk_is_disabled()) return -1; + if (talk_handle <= 0 || index_handle <= 0) { fd = open_voicefile(); @@ -1605,8 +1605,6 @@ void talk_announce_voice_invalid(void) if (global_settings.talk_menu && talk_status != TALK_STATUS_OK) { - talk_temp_disable_count = 0xFF; /* don't let anyone else use voice sys */ - voice_fd = open(talkfile, O_RDONLY); if (voice_fd < 0) goto out; /* can't open */ @@ -1632,13 +1630,12 @@ void talk_announce_voice_invalid(void) qe.length = qe.remaining = voice_sz; queue_clip(&qe, false); voice_wait(); - voice_thread_kill(); } mutex_unlock(&read_buffer_mutex); buf_handle = buflib_free(&clip_ctx, buf_handle); - talk_handle = core_free(talk_handle); + out: close(voice_fd); return; -- cgit v1.2.3