Or check whether you’re using alsa or pulse audio. I can’t say for certain I’ve had any trouble because of this, but I know somebody who has (though not blender related). Do blender sounds work outside of the GE?
I also have a similar problem, sound doesn’t work in the game engine or in the sounds panel. However in the sequence editor I can add audio tracks if I use the hard drive version rather than the RAM version.
(by the way, I’m using Ubuntu 8.10 and Blender 2.48a)
MinceMeat: Perhaps I should have written that I usually have no problem with sound.
Aloyr: I did not have libsox-fmt-all but obtaining these has not fixed the problem.
I got the .blend file of my game and put it into a Windows machine to see if it was something I did bad in linking the sound. Sound works fine on the Windows machine with no changes to the file whatsoever, so I’m thinking it must be an Ubuntu specific Blender configuration error.
Here’s my .blend file for you to see for yourself. It’s an early exercise from the original Blender Gamekit course: lancer_pumpkin09.blend
I seem to remember something a while back about having to enable / disable things to get “scrub” working for lipsync… that was some time ago and I’m struggling to remember what it was… something about Blender needing to “hog” the sound all-or-nothing. I’m not sure whether scrub would be working at the moment or not?
JO9: I was thinking it might be something like that. Having switched drivers, there seems to be no difference (unless I’m switching in the wrong place?). Could it be that Blender needs command-line options to specify something? Both BGE and resulting “compiled” applications (stand alone) have no sound in Ubuntu. Not sure if failed BGE would cause failed output files or whether there is sound, but the OS isn’t playing them.
Flanjygo: Confirming that the scrub feature in sequence editor works (I can use it to lipsync with an animation) but again, the Game Engine sounds do not.
From i have read in the net I think is due to problem with the OpenAL package in Ubuntu.
You can try to compile OpenAl-Soft (http://kcat.strangesoft.net/openal-releases/openal-soft-1.6.372.tar.bz2) to replace the buggy Openal package. Perhaps, additionally to cmake, make and make install commands you will have to make a link (from libopenal.so.0 to libopenal.so.1, I can’t remember exactly)
In the case of the mac-intel platform the problem is that Apple doesn’t have OpenAl library for this platform yet (only for PPC). You also can try to compile OpenAL-Soft (in this case from SVN-Git repository due a new SDL backend) but I think it will be a bit more complicated.
I hope I did it right. After untarring, I moved the directory of the package to /usr/share/cmake-2.4/Templates/openal/ and then issued a cmake … from there. I then went to the parent directory and issued a make then make install. The make install seemed to be doing something, but even after rebooting the computer…
…still no sound in Blender Game Engine.
Unless you need 3d sound (or are afraid of a little bit of Python ), I’d say to just use PyGame for sounds. Even when the BGE’s sound does “work” it can be buggy and choppy. Or, at least it was the last time I checked, but I think that was 2.45. There’s a thread somewhere in the resources section that explains how to use PyGame sounds in the BGE.
Thanks Moguri for your suggestion. I’d like to get the actual BGE sounds to work if possible, but will use PyGame if I can figure it out.
It annoys me (a little) that BGE sound isn’t working in the first place. It’s not consistent when sound samples work in the Video Sequence Editor, but not in the Games Engine.
For the purpose of demo-reeling game samples, if I were to use PyGame sound, would that mean I’d have to tell end users of my standalone Blender files that they’re going to have to download PyGame before my game will work?
I have installed the Python-PyGame package (1.7 is the latest available for Ubuntu 8.04), though could someone please point me to some “plain English, never used it before” examples of how to use PyGame sounds in Blender? For example, here is how I would create noise if BGE sound were working…
Hit F10 to go into the Scene(F10) panel
Hit the wavy icon on the right (sound block buttons)
Under the first “sound” tab, hit the button to OPEN NEW sample… direct this to the correct WAV.
In the player options, have appropriate sensors / controllers leading to a new SOUND actuator. Use the drop down list inside to select your sound file.
Choose “play end” if you want the whole sound to play.
…if do use PyGame, could someone please show me where I can get similar easy to follow steps?
Also, by following those steps, the end-user will not need PyGame, but they will need Python.
Another thing, I think the sequencer and BGE audio use two different audio systems. I believe the sequencer uses ffmpeg while the BGE uses OpenAl + SDL. However, I could be wrong.
The openAl-soft is not installed in these directories.
When you did “make install” in openal-soft directory did you perform this operation as root or as lancer user?
The locate command gave no feedback, and the files I’ve just found in /usr/share/cmake-2.4/Templates/openal look like I need to make something in there?