Jump to content
  • Advertisement


This topic is now archived and is closed to further replies.


Windows sound API questions

This topic is 6457 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I''ve been digging around for Windows sound program leads since my last post and found a mention of sndPlaySound() in a Windows graphics and sound programming book. It dosen''t go into detail about other DSP type sound programming on Windows, so I was wondering if there are any experianced Windows sound programmers who could give me advice on playing basic DSP (ie wav files) sound on Windows? Thanks in advance!

Share this post

Link to post
Share on other sites
Guest Anonymous Poster


sndPlaySound is capable of playing wave files from the storage
device (e.g. hard disk) as well as a memory pointer.
But if you need more functionality like software sound effects
you should use the wave device API functions they are all
started with wave for example waveOutOpen or waveOutPrepareHeader
These type of wave functions provide direct access to the sample
buffer, notification mechanism via messages-callback funtions-events, etc. Plz reply if you need more help on this.

My username here is Seyedof but i have forgotten my password
so i''ll back with my own username.

--(MFC) The Matrix Foundation Crew

Share this post

Link to post
Share on other sites
Hi Seyedof!

Thanks for the response, yes I do need further help!

Actually what you described is a bit more complex than
what I needed.

Currently I have a game that needs to play three types of

First is DSP (wav files), which isplayed once (async) and then that''s it. Like a door opening or tire screetching.

Second is more complex, this is also a DSP (wav file) but
it needs to be played repeatedly and infinatly untill the
controlling process tells it to stop. In addition the sample
rate of this DSP needs to be devient (this is the term we use
on UNIX). For example if the recorder (sound card) is set to
11025 Hz, I want the sample to be played at say 22050 Hz but
with the hardware still set to 11025 so it sounds `faster''.
Ie a automobile engine sound.

Third is music, which is played async and repeatedly as preferably MIDI files. These need to be repeated and told
when to stop at some point.

In all of the cases, the sound can be async.

Share this post

Link to post
Share on other sites

  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!