#------------------------------------------------------------------------------
-# $File: audio,v 1.94 2019/01/04 14:01:49 christos Exp $
+# $File: audio,v 1.95 2019/01/09 02:59:26 christos Exp $
# audio: file(1) magic for sound formats (see also "iff")
#
# Jan Nicolai Langfeldt (janl@ifi.uio.no), Dan Quinlan (quinlan@yggdrasil.com),
# Summary: Garmin Voice Processing Module (WAVE audios)
# From: Joerg Jenderek
# URL: http://www.garmin.com/
-# Reference: http://turboccc.wikispaces.com/share/view/28622555
+# Reference: http://www.poi-factory.com/node/19580
# NOTE: there exist 2 other Garmin VPM formats
0 string AUDIMG
# skip text files starting with string "AUDIMG"
# if you select a language like german on your garmin device
# you can only select voice modules with corresponding language byte ID like 1
>>18 ubyte x \b, language ID %d
+# structure for phrases/sentences?
+# number of voice sample in the 1st phrase?
+#>>19 uleshort x \b, 0x%x samples
+#>>>21 uleshort >0 \b, at 0x%4.4x
+#>>>(21.s) ubequad x 0x%llx
+# 2nd phrase?
+#>>23 uleshort x \b, 0x%x samples
+#>>>25 uleshort >0 \b, at 0x%4.4x
+#>>>(25.s) ubequad x 0x%llx
# pointer to 1st audio WAV sample
>>16 uleshort >0
->>>(16.s) ulelong >0 \b, at offset 0x%x
+>>>(16.s) ulelong >0 \b, at 0x%x
# WAV length
->>>>(16.s+4) ulelong >0 %d Bytes
+# 1 space char after "bytes" to get phrase "bytes RIFF"
+>>>>(16.s+4) ulelong >0 %u bytes
# look for magic
>>>>>(&-8.l) string RIFF
# determine type by ./riff
->>>>>>&-4 indirect x \b
+>>>>>>&-4 indirect x
# 2 - ~ 131 WAV samples following same way
#
# Summary: encrypted Garmin Voice Processing Module