summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--apps/talk.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/apps/talk.c b/apps/talk.c
index ad34437b0f..5fddf85986 100644
--- a/apps/talk.c
+++ b/apps/talk.c
@@ -641,11 +641,6 @@ void talk_init(void)
641 strlcpy((char *)last_lang, (char *)global_settings.lang_file, 641 strlcpy((char *)last_lang, (char *)global_settings.lang_file,
642 MAX_FILENAME); 642 MAX_FILENAME);
643 643
644#if CONFIG_CODEC == SWCODEC
645 audio_get_buffer(false, NULL); /* Must tell audio to reinitialize */
646#endif
647 reset_state(); /* use this for most of our inits */
648
649 filehandle = open_voicefile(); 644 filehandle = open_voicefile();
650 if (filehandle < 0) { 645 if (filehandle < 0) {
651 has_voicefile = false; 646 has_voicefile = false;
@@ -654,6 +649,11 @@ void talk_init(void)
654 } 649 }
655 650
656 voicefile_size = filesize(filehandle); 651 voicefile_size = filesize(filehandle);
652
653#if CONFIG_CODEC == SWCODEC
654 audio_get_buffer(false, NULL); /* Must tell audio to reinitialize */
655#endif
656 reset_state(); /* use this for most of our inits */
657 657
658 /* test if we can open and if it fits in the audiobuffer */ 658 /* test if we can open and if it fits in the audiobuffer */
659 size_t audiobufsz = audiobufend - audiobuf; 659 size_t audiobufsz = audiobufend - audiobuf;