···4444#include "debug.h"
4545#include "panic.h"
4646#include "misc.h" /* time_split_units() */
4747+#include "mv.h"
47484849/***************** Constants *****************/
4950···11671168 return 0;
11681169}
1169117011711171+#ifdef HAVE_MULTIVOLUME
11721172+int talk_volume_id(int volume)
11731173+{
11741174+ if (volume == -1)
11751175+ return 0;
11761176+11771177+ int drive = volume_drive(volume);
11781178+ // XXX voice "VOLUME" or something like that?
11791179+11801180+ talk_id(drive? LANG_DISK_NAME_MMC : LANG_DISK_NAME_INTERNAL, true);
11811181+ talk_value(volume, UNIT_INT, true);
11821182+ return 1;
11831183+}
11841184+#endif
11851185+11701186/* Play a directory's .talk thumbnail, fallback to spelling the filename, or
11711187 go straight to spelling depending on settings. */
11721188int talk_dir_or_spell(const char* dirname,
···11741190{
11751191 if (global_settings.talk_dir_clip)
11761192 { /* .talk clips enabled */
11771177- if(talk_file(dirname, NULL, dir_thumbnail_name, NULL,
11931193+ if (talk_file(dirname, NULL, dir_thumbnail_name, NULL,
11781194 prefix_ids, enqueue) >0)
11791195 return 0;
11801196 }
11811181- if (global_settings.talk_dir == TALK_SPEAK_SPELL)
11971197+ if (global_settings.talk_dir == TALK_SPEAK_SPELL) {
11821198 /* Either .talk clips disabled or as a fallback */
11831199 return talk_spell_basename(dirname, prefix_ids, enqueue);
12001200+ }
11841201 return 0;
11851202}
11861203···12011218 while(ptr) { /* There are more slashes ahead */
12021219 /* temporarily poke a NULL at end of component to truncate string */
12031220 *ptr = '\0';
12041204- talk_dir_or_spell(buf, NULL, true);
12211221+#ifdef HAVE_MULTIVOLUME
12221222+ if (start == buf+1) {
12231223+ int vol = path_get_volume_id(buf+1);
12241224+ if (!talk_volume_id(vol))
12251225+ talk_dir_or_spell(buf, NULL, true);
12261226+ } else
12271227+#endif
12281228+ talk_dir_or_spell(buf, NULL, true);
12051229 *ptr = '/'; /* restore string */
12061230 talk_id(VOICE_CHAR_SLASH, true);
12071231 start = ptr+1; /* setup for next component */
12081232 ptr = strchr(start, '/');
12091233 }
12341234+12101235 /* no more slashes, final component is a filename */
12111236 return talk_file_or_spell(NULL, buf, NULL, true);
12121237}
+4
apps/talk.h
···145145void talk_time(const struct tm *tm, bool enqueue);
146146void talk_date(const struct tm *tm, bool enqueue);
147147148148+#ifdef HAVE_MULTIVOLUME
149149+int talk_volume_id(int volume);
150150+#endif
151151+148152/* speaks hr, min, sec, ms; unit_idx is lowest or base unit of the time value */
149153int talk_time_intervals(long time, int unit_idx, bool enqueue);
150154