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.
Audio and sound
-
- Posts: 386
- Joined: Thu Sep 25, 2003 12:43 pm
- Contact:
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
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
-
- Posts: 29
- Joined: Fri Sep 19, 2003 8:36 am
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 !
I forget to link my program to audiere.a library !!
Here my game with background sound :stimpunx.fr.st
Thanks a lot !
-
- Posts: 386
- Joined: Thu Sep 25, 2003 12:43 pm
- Contact:
-
- Posts: 29
- Joined: Fri Sep 19, 2003 8:36 am
-
- Posts: 271
- Joined: Sat Aug 23, 2003 5:52 pm
- Location: Hurricane Central, Florida
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 soAnd then somewhere in your code you need to load a sound in the object like this: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
AudioDevicePtr audioDevice(OpenDevice());
OutputStreamPtr menu_music = 0;
Code: Select all
menu_music = OpenSound(audioDevice, "supa-g1.ogg", true);
Code: Select all
menu_music->setVolume(MUSIC_VOLUME);
menu_music->setRepeat(true);
menu_music->play();
-
- Posts: 386
- Joined: Thu Sep 25, 2003 12:43 pm
- Contact: