Random sounds with the SDL_mixer


I'm currently trying to make the SDL_mixer play random sounds with C++ (when there is multiple .wav inside a trigger for exemple).
For now I looked at the code, but I still can't find how to access the different .wav inside a trigger.
If someone has already tried or wants to do that, I'd be happy to hear about it.

Re: Random sounds with the SDL_mixer

Hi johntelman7x7,

That's not possible with the current version of the SDL_mixer implementation without extra coding. Currently all connected audio files will be played immediately upon trigger execution. To make what you're asking work one would have to make extensive changes to the SDL_mixer implementation. We have discussed additional features a few times in the past and have a clear idea of how this should work. We realized that it requires a lot of work as it involves introduction of an "event" concept (basically an abstraction exactly like Wwise and Fmod do it) and a Designer Tool to allow for setup and manipulation of those events. Then you can go even further and not just introduce playback behavior but also parameter, switches and effects support. Again, it's a lot of work and SDL_mixer doesn't have that focus currently.

Who is online

Users browsing this forum: No registered users and 2 guests