(1) is just not very precise, what I meant was “in the directory where the mnum files/folder is”. What I actually wrote can be interpreted in multiple ways, and some of those ways are, as you point out, incorrect.
Note that mnum doesn’t have to be a folder, it could just be a set of files.
Now, if you’re not interested in how all of this actually works; stop reading now.
ProffieOS has a class called ‘Effect’. Each Effect has:
- a name (“hum”, “mnum”, etc.)
- smallest file number seen
- largest file number seen
- the directory the files were seen in
- the file pattern, like “NAME##.wav” or “NAME/###.wav”
There is an Effect object for each sound effect, so there is one for “hum”, one for “clash”, etc.
When you switch the font path to something like “hero;common” the “hero” and the “common” directories are scanned, and all the effect objects are initialized so that we know how many files of each type there are.
When effect occurs, like a clash, we generate a file name based on what the effect class found during scanning. The effect class will tell how how many files were found, in what directory, and what the file pattern was, so it can quickly generate something like “hero/clsh/005.wav” without having to search through the files again.
However, voice pack files are different. There are a lot of them, and I didn’t want to have one Effect object for each one of them. For that reason I made it so that it would search for these files when you need them, rather than during the scan phase. The search is fairly simplistic though. When looking for maccept.wav, it would only look in “hero/maccept.wav” and “common/maccept.wav” (assuming your font path is “hero;common”).
The problem is that this doesn’t work with alt sounds. One way to fix this would be to check “hero/alt###/maccept.wav” and “common/alt###/maccept.wav” in addition to the two paths we already check, but this is both more code and more checks, which can slow things down.
Since “mnum” should be a part of all voice packs, we should already know the path to the voice pack. This means that we don’t need to search at all. If “mnum” exists in “hero/alt###/mnum”, then clearly maccept.wav should be in “hero/alt###/maccept.wav”. So basically we just take the directory from the mnum Effect, append “maccept.wav” and use that. No searching required, and it works with alt directories. And since we don’t need the old search code, it takes nearly the same amount of space in FLASH memory.
For most people, none of this matters. The only way you would notice a difference is if you have some of your voice pack files in your font directory, and the rest in “common”, and if that’s what you have, then there is a define for getting the old behavior back: SEARCH_FOR_SOUND_LIBRARY_FILES