Hello world.
This question borders between the world of the audio designer and the programmer. While this question might have to be partially answered by that domain of an audio designer, it is sure a problem for the programmer. In our project, we want to loop a sound (background music) while the game timer is greater than one minute left. When this time is hit, we wish to stop the music as authored, and then immediately continue with ending segment. I have been looking into XACT, and it seems to have support for different events. Unfortunately the documentation is lacking, and the application is somewhat alien to me as a programmer.
What I am looking to do is something along these lines (different approaches):
- When the music stops, I want to tie an event to play another sound immediately
- When a marker is triggered in the music, I want to play another sound immediately
- I would also like to know in my application when some of these events happen
The problem is that I haven't been able to find any mechanism to auto-play sound when another sound begins and that I can't find a way to hook up with the events made in the XACT project to C#.
If this can't be done (i.e. XACT/XNA lacks support for these operations), please gather your ideas on how to solve this problem with minimal cross-sound time errors. Preferably I would be able to control as much as possible of this in C# with calls to XNA.