I made a post about this like 4 months ago but never got a good answer.
Is it possible to build a music file into a program?
So you dont need the .wav or .mp3 or whatever file?
Thanks
I made a post about this like 4 months ago but never got a good answer.
Is it possible to build a music file into a program?
So you dont need the .wav or .mp3 or whatever file?
Thanks
Yes, If you're on windows then you can add then file as a resource.
How I play it when its a resource then?
Still PlaySound?
For Win32 look at the winmm.lib. Check the SDK for multi-media support via winmm.
Sorry I got no idea what ur talking about to be honest. :P
All I know I need to use winmm in the compiler to make my exe play songs.
I know how to use PlaySound, but not when my song is builded into the exe?
Last edited by XunTric; 01-08-2006 at 02:10 PM.
Mmmm
http://msdn.microsoft.com/library/de...dplaysound.asp
What does SND_MEMORY mean?
Like this?
Btw, how do I add a song as a resource?Code:#include <iostream> #include <windows.h> #include <mmsystems.h> using namespace std; int main(void) { sndPlaySound("test.wav", SND_MEMORY | SND_NODEFAULT); //To not make the program quit right after the song starts to play cin.get(); return 0; }
Sorry for my dumbness.
Bump...
I'll let you in on a little secret: if you want an instant answer, use this. put your question in there, and somebody will check this thread and give you an answer within hours.
Join is in our Unofficial Cprog IRC channel
Server: irc.phoenixradio.org
Channel: #Tech
Team Cprog Folding@Home: Team #43476
Download it Here
Detailed Stats Here
More Detailed Stats
52 Members so far, are YOU a member?
Current team score: 1223226 (ranked 374 of 45152)
The CBoard team is doing better than 99.16% of the other teams
Top 5 Members: Xterria(518175), pianorain(118517), Bennet(64957), JaWiB(55610), alphaoide(44374)
Last Updated on: Wed, 30 Aug, 2006 @ 2:30 PM EDT
> Bump...
I see you didn't bother to wait for my PM response then...
You said you didnt know so much about windows programming?Originally Posted by Salem
major_small, lol, report bad post?
Hey, look at this thread, it should help you, and you should be asking this in windows HERE.
Thats for playing a .wav file outside the program.
Which I said Ive already know how to do.
Not a song builded into the .exe...