Pregunta

I am looking to add adaptive music via layering to my game, developed in XNA Game Studio.

For example, there's an eerie stringed instrument playing slowly. Then perhaps when you approach an enemy, a percussion track would increase in volume.

I can work out the details with timing and such, however I read that it is not possible to play multiple music tracks simultaneously. How should I go about this?

¿Fue útil?

Solución

Yes, you're right. The XNA's MediaPlayer is not capable of playing multiple songs simultaneously. XACT is an option that is capable of this and integrates pretty well with XNA.

Here are some links that might help you:

  1. Basic tutorial
  2. Specifying background music
  3. Change sounds' volume
  4. Change volume with global variables

What you want to do is create some sounds in a streaming wave bank and specify them as music. It may be a good idea to create global variables for the different sound levels, but this is optional.

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top