I basically need to load a sound into a project, just like a background sound, nothing too fancy, but dont know where to start. My project contains a room build around 5 simple quads, and i basically want to add a sound, like the sound of being inside of a spaceship (in space).
I googled for a tutorial but couldnt find anything, only the OpenAL thing, which looks really complicated. Isnt there any easy code for copy/pasting for loading a sound file… just like simple html hehe
So i have a small problem, because i am developing in Xcode on my Mac. The only 2 files included in the OpenAL framework are the following: #include <OpenAL/al.h> #include <OpenAL/alc.h>
where they state in the tutorial the following: #include <conio.h> #include <stdlib.h> #include <al/al.h> #include <al/alc.h> #include <al/alu.h> #include <al/alut.h>
they are using for instance the alutLoadWAVFile() function which i dont have the prototype for, because i dont have the alut.h library… any suggestions to what i can do?
So better not use those functions and write your own. I think that goes for all alut functions. Better load the wav into a buffer and feed that to openal instead.
But opengl can be used for audioprocessing also. I believe in the ati sdk is an example on that.
I have never used OpenAL, but generally, ‘deprecated’ means that the function you are using should not be used. You should instead do it in the recommended way told by the OpenAL specification.
This function is still available to support old programs that already use OpenAL.