forked from mirror/openmw-tes3mp
Fix for the --nosound crash
This commit is contained in:
parent
af39275a63
commit
f567950e25
2 changed files with 8 additions and 2 deletions
|
@ -67,6 +67,7 @@ namespace MWSound
|
||||||
, updater(mgr)
|
, updater(mgr)
|
||||||
, cameraTracker(mgr)
|
, cameraTracker(mgr)
|
||||||
, mCurrentPlaylist(NULL)
|
, mCurrentPlaylist(NULL)
|
||||||
|
, mUsingSound(useSound)
|
||||||
{
|
{
|
||||||
if(useSound)
|
if(useSound)
|
||||||
{
|
{
|
||||||
|
@ -105,8 +106,11 @@ namespace MWSound
|
||||||
|
|
||||||
SoundManager::~SoundManager()
|
SoundManager::~SoundManager()
|
||||||
{
|
{
|
||||||
Ogre::Root::getSingleton().removeFrameListener(&updater);
|
if(mUsingSound)
|
||||||
cameraTracker.unfollowCamera();
|
{
|
||||||
|
Ogre::Root::getSingleton().removeFrameListener(&updater);
|
||||||
|
cameraTracker.unfollowCamera();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Convert a soundId to file name, and modify the volume
|
// Convert a soundId to file name, and modify the volume
|
||||||
|
|
|
@ -82,6 +82,8 @@ namespace MWSound
|
||||||
|
|
||||||
IDMap mLoopedSounds;
|
IDMap mLoopedSounds;
|
||||||
|
|
||||||
|
bool mUsingSound;
|
||||||
|
|
||||||
std::string lookup(const std::string &soundId,
|
std::string lookup(const std::string &soundId,
|
||||||
float &volume, float &min, float &max);
|
float &volume, float &min, float &max);
|
||||||
void add(const std::string &file,
|
void add(const std::string &file,
|
||||||
|
|
Loading…
Reference in a new issue