Sound no longer playing with current SVN build

Zach Griffin

25-09-2009 08:34:24


We've just updated to the latest svn version and can no longer play any sounds. The project runs fine with no crashes or compile errors yet nothing can be heard.

The initialisation is:
soundManager = OgreOggSound::OgreOggSoundManager::getSingletonPtr();

To play the sound we call:

and to create the sound we call:
AudioLink::AudioLink( const std::string& _name,const std::string& file, bool stream /*= false*/, bool loop /*= false*/, bool preBuffer/*=false*/ )
soundManager = OgreOggSound::OgreOggSoundManager::getSingletonPtr();
sound = 0;
name = _name;
if ( sound = soundManager->createSound(name, file, stream, loop) )
// soundManager->getSound(name)->setMaxDistance(50);
// soundManager->getSound(name)->setReferenceDistance(1);
// soundManager->getSound(name)->setRelativeToListener(true); // TODO Remove for 3d sound

What is the minimum setup to play a 2D stereo sound?


25-09-2009 22:07:40

What kinds of sounds are you trying to play and which version of the library - multi-threaded/non multi-threaded?

I've just discovered and fixed a streamed wav bug which resulted in no sound being heard after playing...

The minimum to play a 2d stereo sound would be..

OgreOggSound::OgreOggSoundManager* man=OgreOggSound::OgreOggSoundManager::getSingletonPtr();
OgreOggISound* sound=man->createSound("Sound1", "sound.ogg");

btw, all stereo sounds are 2d.


26-09-2009 04:25:03

We're using the threaded version and playing a few 2D sounds.


26-09-2009 09:29:17

wav's or ogg sounds, streamed or static?

Zach Griffin

26-09-2009 15:59:28

I will have to double check with Vectrex on this but looking from the code they are static sounds. Most of them are Oggs with one wav file. Stepping through the code I can see each sound is getting created and also being called to play without any errors so I'm not sure what is causing it. The sounds played with the older version so it must be a new parameter we are missing. We call the init, create the sound, play the sound and call update so there is only so much that could be stopping them from being played.


26-09-2009 18:14:12

Thats very odd, I don't experience any problems with sounds in my test applications.

Are you bulk loading/playing your sounds? Does the test demo work?


01-10-2009 17:14:06

I updated to the latest svn and we think that made the sounds play (although they played once before :) )
The problem now is I think the play and stop doesn't work too well. It's hard to put my finger on it, but we've got an engine sound which uses 6 looping rev ranges. Usually I fade in/out these sounds as your revs increase. This works fine. The other thing I usually do is play/stop the sounds when they go out of audible volume. This doesn't seem to work anymore as it's really sporadic. Can you test some volume/start/stop stuff? The test demo doesn't do anything like that.


02-10-2009 09:15:19

hmmm, strange, I'll try and test that sometime.


06-10-2009 21:37:46

I had a quick test fading in/out a few sounds as well as stopping/pausing and didn't come across any issues.

In your implementation are you running out of sources maybe and this issue could be related to the sounds trying to grab a free source? or do you know if you have enough sources for the sounds to be always ready to play?