Mixing Audio Win32 Style
Lots of documentation in the MSDN talk about the ability to mix two (or more) audio sources together without DX (via the waveout [depending on the OS], via the mixer functions, and/or the incorporated KMixer system software mixer). But, to my great disappointment, no real example show how to play these sounds together. Does anyone have a clue on how to do this or know where I can educate myself?
Thanks
Jonathan
<< Does anyone have a clue on how to do this or know where I can educate myself? >>
Not sure how to do that, I know PlaySound only plays one sound at a time, the second sound interrupts the one playing.
If you want to use DirectSound for mixing sounds, I made a simple demo, about the bare minimum you need to load sounds into buffers and play them using the handy dsutil functions included with DirectX 6 SDK
DirectSoundDemo.cpp EXE
dsutil.h dsutil.cpp
Phil P
Not sure how to do that, I know PlaySound only plays one sound at a time, the second sound interrupts the one playing.
If you want to use DirectSound for mixing sounds, I made a simple demo, about the bare minimum you need to load sounds into buffers and play them using the handy dsutil functions included with DirectX 6 SDK
DirectSoundDemo.cpp EXE
dsutil.h dsutil.cpp
Phil P
Look at the Quake 1 Source code, it''s always a source of inspiration. In snd_win.c, you''ll find something like waveoutopen() or something. Quake uses its own sound mixer (snd_mix.c), it''s very well written, and it''s quite portable.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement