mcimolin
30-06-2010 23:26:45
I'm new to using OgreOggSound, but I followed the demo program in the SVN, and I think I did everything right,
However, every time I start my application it crashes at mSoundManager.init() and I have no idea why. I've tried
recompiling the .dll but with no success. Is there something else I should be building?
I'm using Ogre 1.7.0 and Visual Studio 2008 V9.
Thanks in advance
However, every time I start my application it crashes at mSoundManager.init() and I have no idea why. I've tried
recompiling the .dll but with no success. Is there something else I should be building?
I'm using Ogre 1.7.0 and Visual Studio 2008 V9.
#include "AudioCore.h"
/*
Constructor
*/
AudioCore::AudioCore(){
mSoundManager = OgreOggSound::OgreOggSoundManager::getSingletonPtr();
}
/*
Destructor
*/
AudioCore::~AudioCore(){
delete mSoundManager;
}
/*
Iinitializes the sound manager
*/
void AudioCore::init(){
mSoundManager->init();
sCrash = mSoundManager->createSound("Crash", "Crash.ogg", true, false, false);
sBackground = mSoundManager->createSound("Background", "Background.ogg", true, true, false);
}
/*
Plays a sound effect
*/
void AudioCore::playSoundEffect(){
sCrash->play();
}
/*
Plays the background music
*/
void AudioCore::playBackgroundSound(){
sBackground->disable3D(true);
sBackground->play();
}
/*
Updates the sounds
*/
void AudioCore::update(Ogre::Real time){
mSoundManager->update(time);
}
/*
Returns sCrash
*/
OgreOggSound::OgreOggISound* AudioCore::getSoundEffect(){
return sCrash;
}
/*
Returns sBackground
*/
OgreOggSound::OgreOggISound* AudioCore::getBackgroundMusic(){
return sBackground;
}
Thanks in advance