Hi,
I am writting a C++ application using OpenGL and GLUT. I am working to avoid platform specific references in the code such as Windows. I hope to make this program port over to Linux OS with very little code change.
Are there any Class source code samples for reading a WAV file for the purpose of adding sound effects to a program? A how-to tuturial would be even better so I can learn to do this. MIDI would be the next consideration...or anything else you might recommend that is better.
My 7 year-old thinks the program is pretty cool but he must make up his own sound effects for shooting his laser... :-) He does sound pretty cool himself. ;-)
Success!
I am attaching a simple program. I found a tutorial on using SDL and the SDL_mixer library. After some debugging, I put together a simple console program that starts, plays a 'phaser.wav' file. That's it. I am attaching the Dev-C++ 4.01 project, source and exe along with wav file.
You need SDL_mixer.lib to compile. Check the path in my project linker options to match your system. I think SDL.DLL is required also in system folder.
I did it without having to initialize SDL...which I thought was interesting because I thought this was a requirement.
I will insert this code into my OpenGL project to see if it works well.
Any idea where I can get some free WAV special effects files?