Jump to content

Figuring out sound in C++ in 4 hours?


CrewXp
 Share

Recommended Posts

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;
}
Link to comment
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

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...