01-02-2012 01:00 PM
I was looking at the PlayAudio example, and I wonder if I can use this API to load and play mutiple sound effects or if it is only intended to play a music track in the background or both ?
01-03-2012 02:43 PM
The sample application's main purpose was to show how to use the mmrenderer API to play music.
The sample is similar to the way you would play background music as a part of your application.
In terms of multiple sound effects, I'm not sure what the difference would be.
I could venture a guess that you would have background music playing in one thread and then short sound effects playing in another thread whenever the user does a special action or accomplishes a specific task.
Is that what you mean?
01-03-2012 03:28 PM
Hi anhu, thanks for your reply,
I meant playing sounds effects and background music as in a game.
I also saw the PlayWav sample which uses different APIs, so I'm not sure what should be the way to play sound effects and music simultaneously in a game app.
mmrenderer API seems straight forward, so I would like to know if I can use it to play both sounds and music, if not, what should I use ?, mmrenderer for music and the PlayWav routines for sounds ?
01-03-2012 03:57 PM
It really just depends on how you want to deploy your background music and sound effects. It is possible to have your music playing in the background and then then playing other short sound effects when you want anytime during game play.
If you want to keep your sound effects in wav format then you can have your background music playing and follow the PlayWav sample to play the wav files. This would work and sound as you would normally expect.