Xyptilon2
asked on
How to insert a .wav in the resource of an exe file and play it using Playsound()?
How to insert a .wav in the resource of an exe file and play it using Playsound()?
ASKER CERTIFIED SOLUTION
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
SOLUTION
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
When doing the PlaySound/sndPlaySound methods to directly play the audio from the resource only 'WAVE' works (using the SND_RESOURCE flag). I would guess those MS SDK calls have hardcoded thier resource lookups.
If you load it into memory manually you are right, anything will do as long as you match the call to what you put in the resource file.
If you load it into memory manually you are right, anything will do as long as you match the call to what you put in the resource file.
>>When doing the PlaySound/sndPlaySound methods to directly play the audio from the resource only 'WAVE' works
YES!
What I mean is to insert to and extract from resource...
I'm using that long time now, have all wav files inside a dll but I'm using DirectSound to play them...
DirectSound plays the sounds from a buffer (DirectSoundBuffer)...
George Tokas.
YES!
What I mean is to insert to and extract from resource...
I'm using that long time now, have all wav files inside a dll but I'm using DirectSound to play them...
DirectSound plays the sounds from a buffer (DirectSoundBuffer)...
George Tokas.
ASKER
Thanks guys! I got it working!
Whatever can be used as long as the middle description in this line and the last variable on FindResource() is the same...
I tried that and verify it...:-)
Sometimes one needs to confuse others, like a kind of cryptography....
George Tokas.