Is there some way to find out which sound channels are currently being used? I'd like to setup my sound system library to use specific channels for specific things, but I don't want to end up in situations where a long sound effect, such as an ambient sound, is being played on one of the reserved channels. In that case, when the reserved channel gets used, it ends up overriding the sound that's already playing and cuts it short.
As an example: Suppose the background music is playing on channel 1, while the game is playing a background waterfall sound effect repeatedly on randomly selected channel 2. I'm using my sound system library and I change the background music, so the library begins fading out channel 1, then loads the second song on channel 2 and begins fading it in. The result is that the repeating waterfall sound is suddenly cut off because the music started playing in that channel.
I would like to have some way of knowing which channels are currently in use so that I can offer sounds a random channel in any of the non-reserved channels, but I can't find any way to do this.
ID:151730
![]() Jul 15 2009, 8:16 am
|
|
You'd have to use a soundcard with software (like creative xfi) to see your channels, as far as I know anyway.
You could probably profile, or layer the songs somehow through programming but only being a designer I don't know if that is actually possible in DM. If you have a soundcard with 64 channels that is how you know, you look it up and check the technical specs to see which ones are used for what (midi, wav, etc, system sounds, blah.). Again I don't know if this is the best direction to take but its the only way I know of. Something called soundbank with creative can select channels, there are also music editting programs that can select channels. However I don't know if any of this helps. The sound itself must be manipulated rather than the code manipulating the sound. |
Yep, same here. Unfortunately, we are just limited in that department, as far as complete sound interaction and information-retrieving goes. Maybe there might be one, but I don't know any way to check if a channel is used or to get a song's duration (which you somewhat could use to do the above, though not too well). You could probably do the latter with external aid (like a DLL), but eh. You could also build a premade database of the duration of all the sound files in your game (could be autogenerated, also with an external aid), but that's 'eh' as well.