0

Can somebody help me with making simple win32 gui application (i'm using code::blocks) in which I can play two sounds at the same time. When message loop receives WM_CREATE i want to start playing music.wav, and everytime user clicks window (WM_LBUTTONDOWN) i want to play click.wav (without interrupting music.wav). I searched for it and I found that it can be done with directsound (directx), but it was too complicated because it has a lot of more functions. Is it possible to do it in more simple way (something like playsound api function or something - I know it can not play two sounds at the same time, but is there anything similar). And if possible, I would like to play wave files from resources.

Thank you in advance

4

1 回答 1

0

您可以使用 XAudio2,因为 DirectSound 已被弃用。

XAudio2 简介

阅读“入门”部分,有阅读和播放音频的示例代码。您只需要创建一个“主控声音”并添加一些声源。

于 2013-02-03T22:32:05.297 回答