Mixing Audio Win32 Style

Started by
2 comments, last by ageny6 20 years, 8 months ago
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
My signature used to suck. But it's much better and more accurate now.
Advertisement
<< 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
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.
I''m not sure that using the source code from Quake1 for my purposes is be the best idea in the world, but it definitly gave me a good sense of what they are doing. Thanks

Is there a good article out there that treats the subect of sound mixing?

Jonathan
My signature used to suck. But it's much better and more accurate now.

This topic is closed to new replies.

Advertisement