Could not determine buffer format
Hi, first time usinig OgreAL, Im trying to use sound in a 3d space, if I create one sound and then use getsound, not attaching it to any node or anything, just play it once in a while it works, but when I try to create instances of the same sound I get this message.
!!WARNING!! Could not determine buffer format! Defaulting to MONO
Any thoughts about this?
Second question is there like a written tutorial on how t use OgreAL or is there only the demos?
That warning comes from parsing the sound in, so it should only ever happens when you load the sound for the first time, since every subsequent instance actually references the same buffer. What kind of a file are you loading in? Is it a WAV?
There are currently no tutorials that I know of, only the demos. There is a [u]book[/u]
that has a chapter on game programming using Ogre and OgreAL. It's a little pricey and there is only the one chapter on Ogre, the rest of the book in teaching basic C++, but it's a really good book to learn from if you are just learning.
Thanks for the reply, and yes it is a wav file.
Can you send me the file? I have put together my own wav parsing and it could be that it's just not robust enough. I can't promise I'll get to it soon, but I will do my best. Until then, having it default to mono is really what you want anyway for a sound that you are going to play in 3D space.
I've sent you the file.
A problem I thought was directly related to this is that I can't hear anything by doing this, only when I use getSound do I actually hear anything, and after i use sound->play and ask if it is playing I get a false.
Edit: When I only use createSound once I don't get the warning message, only when I use create several instances.
Can you post your code so I can see how you're initializing OgreAL and creating the sounds?
In my game state
_soundManager = new OgreAL::SoundManager();
then in my factory, for each object I create I do
OgreAL::Sound *sound = OgreAL::SoundManager::getSingletonPtr()->createSound((name + "Sound"), "test.wav");
In my player class I do
I then call sound->play() in a OgreNewt collision callback function