summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSolomon Peachy <pizza@shaftnet.org>2024-06-20 17:38:39 -0400
committerSolomon Peachy <pizza@shaftnet.org>2024-06-22 07:03:59 -0400
commitfa6b6b6c2d53b5bd93ffa92b6d13b3ff21c71ea7 (patch)
treef37ea156f45c7530a5b776e4e3895d2766241124
parentbb127469722ce94fe481e14984bcd0502844d1eb (diff)
downloadrockbox-fa6b6b6c2d53b5bd93ffa92b6d13b3ff21c71ea7.tar.gz
rockbox-fa6b6b6c2d53b5bd93ffa92b6d13b3ff21c71ea7.zip
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
-rw-r--r--apps/talk.c7
1 files 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 @@
5 * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < < 5 * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
6 * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \ 6 * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
7 * \/ \/ \/ \/ \/ 7 * \/ \/ \/ \/ \/
8 * $Id$
9 * 8 *
10 * Copyright (C) 2004 Jörg Hohensohn 9 * Copyright (C) 2004 Jörg Hohensohn
11 * 10 *
@@ -1080,6 +1079,7 @@ static int _talk_file(const char* filename,
1080 /* reload needed? */ 1079 /* reload needed? */
1081 if (talk_is_disabled()) 1080 if (talk_is_disabled())
1082 return -1; 1081 return -1;
1082
1083 if (talk_handle <= 0 || index_handle <= 0) 1083 if (talk_handle <= 0 || index_handle <= 0)
1084 { 1084 {
1085 fd = open_voicefile(); 1085 fd = open_voicefile();
@@ -1605,8 +1605,6 @@ void talk_announce_voice_invalid(void)
1605 1605
1606 if (global_settings.talk_menu && talk_status != TALK_STATUS_OK) 1606 if (global_settings.talk_menu && talk_status != TALK_STATUS_OK)
1607 { 1607 {
1608 talk_temp_disable_count = 0xFF; /* don't let anyone else use voice sys */
1609
1610 voice_fd = open(talkfile, O_RDONLY); 1608 voice_fd = open(talkfile, O_RDONLY);
1611 if (voice_fd < 0) 1609 if (voice_fd < 0)
1612 goto out; /* can't open */ 1610 goto out; /* can't open */
@@ -1632,13 +1630,12 @@ void talk_announce_voice_invalid(void)
1632 qe.length = qe.remaining = voice_sz; 1630 qe.length = qe.remaining = voice_sz;
1633 queue_clip(&qe, false); 1631 queue_clip(&qe, false);
1634 voice_wait(); 1632 voice_wait();
1635 voice_thread_kill();
1636 } 1633 }
1637 1634
1638 mutex_unlock(&read_buffer_mutex); 1635 mutex_unlock(&read_buffer_mutex);
1639 1636
1640 buf_handle = buflib_free(&clip_ctx, buf_handle); 1637 buf_handle = buflib_free(&clip_ctx, buf_handle);
1641 talk_handle = core_free(talk_handle); 1638
1642 out: 1639 out:
1643 close(voice_fd); 1640 close(voice_fd);
1644 return; 1641 return;