I want to use categories to manage related sounds, so volumes and other modifications, including DSPs, can be applied to whole classes of files at once. But it’s not clear how categories span (event) files and persist as files are loaded and unloaded. E.g. some of our data will be associated with geographical features and locations, and so will be loaded and unloaded as the user moves around the game world.
I would like to use categories to identify the sounds in these files, e.g. as “music”, “effects”, “speech”. But when do I call EventSystem::getCategory()? If before any event files are loaded and categories are stored in the event files will getCategory() return null? If after the first file is loaded will it be associated with that file and so will the category stop working after the file is unloaded? Does it make any difference if a file is always loaded before one is unloaded, so one is already in memory? Or does getCategory() need to be called each time a file is loaded to get all categories in the files ?
Also how does getChannelGroup() work with multiple files ? Are events in the same category automatically added into the same channel group, even as the files are loaded and unloaded? Or does this also need to be reset as files are loaded and unloaded, which might be noticeable in playing sounds?
- JBlackburne asked 12 years ago
There is only one category tree and it’s independent of the projects that contribute to it. When a project is loaded, it’s categories are merged into the category tree. Duplicate categories are ignored on load so don’t expect to load a category with same name and have it’s values override an existing one. Categories stick around even when projects are unloaded. Some find it helpful to create a seperate project just with all the game’s categories in it, load it once at the start and be done with it. That way all categories are available from the get-go.
[quote="andrew":1lffr4km]Some find it helpful to create a seperate project just with all the game’s categories in it, load it once at the start and be done with it. That way all categories are available from the get-go.[/quote:1lffr4km]
that’s what i’m doing and it seems to be working fine.
- dave7L answered 12 years ago
Please login first to submit.