Dodzey
09-06-2008 11:35:12
Hey, this has been annoying me since yesterday evening, so I thought I'd come on here and see what you lot think...
I just quickly stuck OgreAL into my "game framework" and I am having a little bit of trouble getting sounds to play.
This is pretty much the sound code here:
mALSoundMgr->hasSound("TestSound") returns true...
but sound->play() returns false
I've done some resource group checking, and the abc.ogg resource exists and can be found by ogre's resource manager, its not in an archive (I read that OgreAL accesses sound files directly so I made a new filesystem resource purely for testing this). I have tried numerous ogg files, ones which were provided by CaseyB as part of the media, and my own. Theres nothing to suggest that the ogg file isn't being loaded as there is a considerable pause which would suggest that the file is being moved into memory.
I am using a multithreaded build of ogreAL, and the ogre resource logs show OgreAL messages and nothing which looks out of the ordinary.
And more strangely, this worked a few weeks ago. I have since changed my code base around slightly, but I can't understand why this small bit of code doesn't work....
Thanks for any help
I just quickly stuck OgreAL into my "game framework" and I am having a little bit of trouble getting sounds to play.
This is pretty much the sound code here:
// Create OgreAL sound manager
new OgreAL::SoundManager();
mALSoundMgr = OgreAL::SoundManager::getSingletonPtr();
// Log all the available audio devices
LOG("AudioManager: Audio devices available: ");
Ogre::StringVector devices = mALSoundMgr->getDeviceList();
Ogre::StringVector::iterator deviceIter = devices.begin();
for( ; deviceIter != devices.end(); deviceIter++ )
{
LOG("AudioManager: -> " + (*deviceIter));
}
// Create a test sound
OgreAL::Sound* sound;
sound = mALSoundMgr->createSound("TestSound", "abc.ogg",false,false);
// Some logging to see if the sound is actually playing/exists
if( mALSoundMgr->hasSound("TestSound") )
{
LOG("Yay!");
}
if( !sound->play() )
{
LOG("Arrgghh!");
}
mALSoundMgr->hasSound("TestSound") returns true...
but sound->play() returns false
I've done some resource group checking, and the abc.ogg resource exists and can be found by ogre's resource manager, its not in an archive (I read that OgreAL accesses sound files directly so I made a new filesystem resource purely for testing this). I have tried numerous ogg files, ones which were provided by CaseyB as part of the media, and my own. Theres nothing to suggest that the ogg file isn't being loaded as there is a considerable pause which would suggest that the file is being moved into memory.
I am using a multithreaded build of ogreAL, and the ogre resource logs show OgreAL messages and nothing which looks out of the ordinary.
And more strangely, this worked a few weeks ago. I have since changed my code base around slightly, but I can't understand why this small bit of code doesn't work....
Thanks for any help