Sign in to follow this  
Followers 0
CrewXp

Figuring out sound in C++ in 4 hours?

9 posts in this topic

Hey, I'm working on a project for one of my classes, and we get extra credit for adding sound. I've tried tons of examples on the internet, but most of them were complicated and hard to understand.

Does anyone know how I can add ANY type of sound to my project before I turn it in, in 4 hours? Wav, Midi, Mp3, WMA. Anything.

Something that will easily fit into a basic script.

//Some Functions
//More Functions

int main()
}
//Code
return 0;
}

Share this post


Link to post
Share on other sites



lol wow.. I knew that word would make someone do that. That's why I added "Wav, Midi, Mp3, WMA. Anything."

Yeah.. beep's are my last resort. Any ideas?

Share this post


Link to post
Share on other sites

thats like the first thing I've tried. The simple approach.

But I get this error after compiling:

1>c:\users\crewxp\documents\visual studio 2005\projects\spiralproject\spiralproject\main.cpp(624) : error C2664: 'PlaySoundW' : cannot convert parameter 1 from 'const char [21]' to 'LPCWSTR'

1> Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast

Share this post


Link to post
Share on other sites

nvm! figured it out. I had to change from unicode to multi-bytee

Share this post


Link to post
Share on other sites

#8 ·  Posted (edited)

now all i need is some relaxing or fun game-background wav files :shocked:

Edited by CrewXp

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  
Followers 0