Sign in to follow this  
Guest zip

DirectSound API Question

Recommended Posts

Help AVSIM continue to serve you!
Please donate today!

Define a symbol in a header file somewhere:#define WAV_CLICK 2023Put this in your .RC file as follows for a wav file located in the sounds subfolder:WAV_CLICK SOUND DISCARDABLE "soundsclick.wav"In your code, use the MAKEINTRESOURCE macro to get the resource you pass to DirectSound when you need a reference to the sound:MAKEINTRESOURCE(WAV_CLICK)

Share this post


Link to post
Share on other sites

>Define a symbol in a header file somewhere:>>#define WAV_CLICK 2023>>Put this in your .RC file as follows for a wav file located in>the sounds subfolder:>>WAV_CLICK SOUND DISCARDABLE "soundsclick.wav"All the above is taken care of when I "import" the WAV with the IDE. It sets up IDR_WAVE1 which I edit to IDR_WAVE_LOW_ROTOR, and leave with the default number.>In your code, use the MAKEINTRESOURCE macro to get the>resource you pass to DirectSound when you need a reference to>the sound:>>MAKEINTRESOURCE(WAV_CLICK)This MACRO is just a cast.I need to be able to use the function in the above post (see the link).

Share this post


Link to post
Share on other sites

Well, appreciate the try, but I've read the SDK, and the MSDN site, in fact, my post above is the relevant link, but the problem is there is not one single example of it being done.The directions are clear, the implementation is not.Thanks for tryin

Share this post


Link to post
Share on other sites

Please don't put SDK and example in the same sentence, I get nauseated :)There are a few examples out there (CodeProject, CodeGuru) on how to load a binary (raw) resource into a buffer.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this