Jump to content
Sign in to follow this  
Guest zip

DirectSound API Question

Recommended Posts

Guest zip

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
Guest HC001ST - Stick

>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
Guest HC001ST - Stick

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
Guest zip

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  

  • Tom Allensworth,
    Founder of AVSIM Online


  • Flight Simulation's Premier Resource!

    AVSIM is a free service to the flight simulation community. AVSIM is staffed completely by volunteers and all funds donated to AVSIM go directly back to supporting the community. Your donation here helps to pay our bandwidth costs, emergency funding, and other general costs that crop up from time to time. Thank you for your support!

    Click here for more information and to see all donations year to date.
×
×
  • Create New...