diff options
-rw-r--r-- | apps/talk.c | 9 | ||||
-rw-r--r-- | apps/talk.h | 2 | ||||
-rwxr-xr-x | tools/genlang | 1 |
3 files changed, 10 insertions, 2 deletions
diff --git a/apps/talk.c b/apps/talk.c index fb16e80417..9c53bb6da5 100644 --- a/apps/talk.c +++ b/apps/talk.c | |||
@@ -613,7 +613,9 @@ static bool load_voicefile_index(int fd) | |||
613 | if (voicefile.table == sizeof(struct voicefile_header)) | 613 | if (voicefile.table == sizeof(struct voicefile_header)) |
614 | { | 614 | { |
615 | if (voicefile.version == VOICE_VERSION && | 615 | if (voicefile.version == VOICE_VERSION && |
616 | voicefile.target_id == TARGET_ID) | 616 | voicefile.target_id == TARGET_ID && |
617 | voicefile.id1_max == TALK_FINAL_ID && | ||
618 | voicefile.id2_max == TALK_FINAL_ID_VOICEONLY - VOICEONLY_DELIMITER) | ||
617 | { | 619 | { |
618 | if (load_index_table(fd, &voicefile)) | 620 | if (load_index_table(fd, &voicefile)) |
619 | return true; | 621 | return true; |
@@ -621,6 +623,11 @@ static bool load_voicefile_index(int fd) | |||
621 | } | 623 | } |
622 | 624 | ||
623 | logf("Incompatible voice file"); | 625 | logf("Incompatible voice file"); |
626 | logf("version %d expected %d", voicefile.version, VOICE_VERSION); | ||
627 | logf("target_id %d expected %d", voicefile.target_id, TARGET_ID); | ||
628 | logf("id1_max %d expected %d", voicefile.id1_max, TALK_FINAL_ID); | ||
629 | logf("id2_max %d expected %d", | ||
630 | voicefile.id2_max, TALK_FINAL_ID_VOICEONLY - VOICEONLY_DELIMITER); | ||
624 | return false; | 631 | return false; |
625 | } | 632 | } |
626 | 633 | ||
diff --git a/apps/talk.h b/apps/talk.h index e8a8645326..a643cd4f89 100644 --- a/apps/talk.h +++ b/apps/talk.h | |||
@@ -134,7 +134,7 @@ int talk_time_intervals(long time, int unit_idx, bool enqueue); | |||
134 | 134 | ||
135 | /* This (otherwise invalid) ID signals the end of the array. */ | 135 | /* This (otherwise invalid) ID signals the end of the array. */ |
136 | #define TALK_FINAL_ID LANG_LAST_INDEX_IN_ARRAY | 136 | #define TALK_FINAL_ID LANG_LAST_INDEX_IN_ARRAY |
137 | 137 | #define TALK_FINAL_ID_VOICEONLY LANG_LAST_VOICEONLY_INDEX_IN_ARRAY | |
138 | /* Enqueue next utterance even if enqueue parameter is false: don't | 138 | /* Enqueue next utterance even if enqueue parameter is false: don't |
139 | interrupt the current utterance. */ | 139 | interrupt the current utterance. */ |
140 | void talk_force_enqueue_next(void); | 140 | void talk_force_enqueue_next(void); |
diff --git a/tools/genlang b/tools/genlang index d0b0f145ef..863a104185 100755 --- a/tools/genlang +++ b/tools/genlang | |||
@@ -718,6 +718,7 @@ MOO | |||
718 | 718 | ||
719 | # Output end of lang_enum.h | 719 | # Output end of lang_enum.h |
720 | print HFILE_CORE <<MOO | 720 | print HFILE_CORE <<MOO |
721 | LANG_LAST_VOICEONLY_INDEX_IN_ARRAY /* this is not a string, this is a marker */ | ||
721 | }; | 722 | }; |
722 | /* end of generated enum list */ | 723 | /* end of generated enum list */ |
723 | #endif /* _LANG_ENUM_H_ */ | 724 | #endif /* _LANG_ENUM_H_ */ |