Support for localized sounds (voice overs)
For the purposes of adding voice-overs to dialogs, it seems like it would be beneficial to be able to add sounds to the languages directory.
My plan for my current project is to add the voiced sound files to a sounds/en/ directory as a workaround for the current version of Solarus. I'm only intending to have a few sounds, so this should work okay.
However, for a project that has a few hundred files for spoken text, I would think that the way Solarus pre-loads sounds could be an issue. I'm thinking that a good solution would be to add support for having sounds in the languages directory and then have sol.audio.preload_sounds()
only pre-load sounds from the sounds directory (but not from the languages directory).
It may be beneficial to have a way to manually pre-load certain sounds in the languages directory (such as any voice-over sounds for the current map). May also want a way to un-load sounds from the languages directory when leaving the map. Or perhaps it's better to not pre-load sounds from the languages directory at all? And then would want to unload the sound after it finishes playing.