September 12, 200421 yr 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
September 12, 200421 yr 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)
September 12, 200421 yr >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).
September 14, 200421 yr 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
September 14, 200421 yr 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