Change sounds directory structure

Change sounds directory structure

Discuss the source code and development of Spring Engine in general from a technical point of view. Patches go here too.

Moderator: Moderators

Post Reply
User avatar
Jools
XTA Developer
Posts: 2816
Joined: 23 Feb 2009, 16:29

Change sounds directory structure

Post by Jools »

If I change the sounds directory in a mod, from the default /sounds one to something with subdirs, how do I tell spring of the new path? Currently it crashes if I do this and I don't get anything in infolog.

Some items in sounds/ are explosions, some are unit selection sounds, some are weapon firing sounds etc. It would make sense to have different subdirs for these, so that different sound items can be created to them.
User avatar
Forboding Angel
Evolution RTS Developer
Posts: 14673
Joined: 17 Nov 2005, 02:43

Re: Change sounds directory structure

Post by Forboding Angel »

https://code.google.com/p/evolutionrts/ ... d%2Fsounds

Evo uses subdirs. You doin it rong?
User avatar
Jools
XTA Developer
Posts: 2816
Joined: 23 Feb 2009, 16:29

Re: Change sounds directory structure

Post by Jools »

XTA uses soundcategories instead, as for example here for arm_adv_sonar station, the sound in unitdef is only ARM_SONAR:

http://code.google.com/p/xta-springrts/ ... tation.fbi

Then in sound.tdf you have the categories defined, but they do not have any path info.

http://code.google.com/p/xta-springrts/ ... /sound.tdf

Therefore I thought that the engine assumes all sounds are always in sounds/ and that it also adds the .wav extension. But since Evo has a different dir-structure and still uses the same engine, I realise I was wrong.

But I now added a filter in sounds.lua that handles the processsing, instead of reading files from different directories.
User avatar
Forboding Angel
Evolution RTS Developer
Posts: 14673
Joined: 17 Nov 2005, 02:43

Re: Change sounds directory structure

Post by Forboding Angel »

Ahhh ok :-D
Post Reply

Return to “Engine”