How to play more than 1 .wav sounds in C++ at the

2019-06-13 19:52发布

I am trying to make a game where I need to play many sounds simultaneously I know v.basic or rather just know about the func. PlaySound() to run .wav sounds.

The problem is that with SND_ASYNC I cannot play multiple sound at once but the sound which plays first skips in the middle and plays the next sound.

Is there any way (simple and easy to understand) so that I can play multiple sounds at once?

2条回答
劫难
2楼-- · 2019-06-13 20:27

Playsound is not meant for mixing sounds. Essentially, it's an older technology that can easily be outdone by more recent ones.

You can use DirectX for sound development in games (a popular choice).

I personally use FMod since it's really easy to use. Here is a tutorial to get you started.

查看更多
狗以群分
3楼-- · 2019-06-13 20:30

I recommend you to use the latest version of fmod (fmod Studio) that give you posibilities to create diferen channels and play various sounds on each channel and aply effects for each one.

查看更多
登录 后发表回答