Unhandled exception - simple OgreAL program

lordmonkey

25-03-2011 14:46:06

Hello everyone,
I have started with Ogre few days ago and yesterday I have compiled (and everything else) OgreAL but I cannot use it because I get this unhandled exception with my code.

void Ball::playSound()
{

soundManagerPtr = OgreAL::SoundManager::getSingletonPtr();
soundManagerPtr = new OgreAL::SoundManager;

wallSoundPtr = soundManagerPtr->createSound("boing","boing.wav",true);
//wallSoundPtr->setRelativeToListener(true);

nodePtr->attachObject(wallSoundPtr);

wallSoundPtr->play();

delete soundManagerPtr;
}


class Ball
{
public:
Ball(void);
~Ball(void);
void playSound(void);

private:
Ogre::SceneNode *nodePtr;

OgreAL::SoundManager *soundManagerPtr;
OgreAL::Sound *wallSoundPtr;
};


the error points at malloc.h . What am I doing wrong ?

I am calling the Ball::playSound() function from ogre's createScene() function.