frier
04-11-2007 13:05:59
Hi,
Im getting a crash on OgreAL shutdown:
Crashes here:
It seems to only crash when i hold a reference of a stl::Map<string,sound> of sounds in a class.
ERROR:
i know it has something to do with this reference i'm holding, but not sure why its crashing? works fine when i remove the reference.
Another Question:
I need to have separate ambient sounds through out different states in my game, how do you guys achieve this? i was thinking of making some sort of singleton class that allows me to change the background music, in any state i will be in. How else can it be done?
-FrieR
Im getting a crash on OgreAL shutdown:
if(mSoundManager){
delete mSoundManager;
mSoundManager = 0;
}
Crashes here:
void Sound::checkError(const Ogre::String& source) const
{
int error = alGetError();
if(error != AL_NO_ERROR)
{
throw Ogre::Exception(3, "OpenAL Error: " + errorToString(error), source);
}
}
It seems to only crash when i hold a reference of a stl::Map<string,sound> of sounds in a class.
ERROR:
Unhandled exception at 0x7c812a5b in Crawlers.exe: Microsoft C++ exception: Ogre::Exception at memory location 0x0012ee74..
i know it has something to do with this reference i'm holding, but not sure why its crashing? works fine when i remove the reference.
Another Question:
I need to have separate ambient sounds through out different states in my game, how do you guys achieve this? i was thinking of making some sort of singleton class that allows me to change the background music, in any state i will be in. How else can it be done?
-FrieR