Skip to content
View in the app

A better way to browse. Learn more.

The AVSIM Community

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

DirectSound API Question

Featured Replies

If I want to do this:CWaveFile waveFile; if (FAILED(waveFile.Open("mywave", NULL, WAVEFILE_READ))){ waveFile.Close();}See: http://msdn.microsoft.com/archive/default...._using_9oz3.aspHow do I associate the string "mywave" with the imported .wav resource???thanks

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)

>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).

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

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.

Create an account or sign in to comment

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.