Page 1 of 1

Audio and sound

Posted: Tue Dec 02, 2003 1:11 pm
by Soldier of infortune
I'd like to add a background music in my game Komando,
I use Linux with Audiere (the sound engine).
The Techdomo runs perflectly under Windows with sound. So i modify this code to my game source code.
But I have got a lot of error ! :-(

Have you got a piece a code that runs under Linux ?

Thanks in advance.

Posted: Tue Dec 02, 2003 9:02 pm
by DarkWhoppy
I've been having abit of trouble with Audiere, when I use it in more than one of my 'classes' it crashes. (I use Windows) But a suggestion would be to try another sound API... FMOD and BASS are ok.

Also, did you make sure to include the right files and link the library? (audiere.lib)

Posted: Tue Dec 02, 2003 10:10 pm
by Cleves
Hey all,

I had the same problem with audiere.So i decided to move to OpenAL.
It's really easy and gives you more control on your sound.
Here are some tutorials that may help you:http://www.devmaster.net/articles.php?catID=6

Posted: Tue Dec 02, 2003 11:07 pm
by Soldier of infortune
You are right DarkWhoppy !

I forget to link my program to audiere.a library !!

Here my game with background sound :stimpunx.fr.st

Thanks a lot !

Posted: Wed Dec 03, 2003 1:07 am
by DarkWhoppy
Looks sweet man! Is it gonna be a 3rd Person Shooter?

Posted: Wed Dec 03, 2003 9:41 am
by Soldier of infortune
Yes, I want to make this kind of game. But there are a lot thing to do !!

Posted: Wed Dec 03, 2003 3:02 pm
by [dx/x]=HUNT3R
I've been using Audiere for a while and it works fine. You just gotta know how to call it correctly. You create an AudioDevicePtr and a sound object at the beginning of your code like so

Code: Select all

AudioDevicePtr audioDevice(OpenDevice());
OutputStreamPtr menu_music = 0;
And then somewhere in your code you need to load a sound in the object like this:

Code: Select all

menu_music = OpenSound(audioDevice, "supa-g1.ogg", true);
And then there's all kinds of calls you can make to a sound object but typically when you just want to play it somewhere you'll do this:

Code: Select all

menu_music->setVolume(MUSIC_VOLUME);
menu_music->setRepeat(true);
menu_music->play();

Posted: Wed Dec 03, 2003 9:05 pm
by DarkWhoppy
Audiere worked fine until I added the libraries to another class... even before I setup the device and stream it causes a heap of errors...