diff --git a/code/nel/src/sound/complex_sound.cpp b/code/nel/src/sound/complex_sound.cpp index 30b97347f..f33f4b2bf 100644 --- a/code/nel/src/sound/complex_sound.cpp +++ b/code/nel/src/sound/complex_sound.cpp @@ -171,6 +171,8 @@ CComplexSound::CComplexSound() : _PatternMode(CComplexSound::MODE_UNDEFINED), _TicksPerSeconds(1.0f), _XFadeLength(3000), // default to 3000 sec. + _DoFadeIn(true), + _DoFadeOut(true), _MaxDistValid(false), _Duration(0), _DurationValid(false) @@ -314,7 +316,8 @@ void CComplexSound::importForm(const std::string& filename, NLGEORGES::UFormElm& if (mode == "Chained" || mode == "Sparse") { // XFade length - formRoot.getValueByName(_XFadeLength, ".SoundType.XFadeLength"); + if (!formRoot.getValueByName(_XFadeLength, ".SoundType.XFadeLength")) + formRoot.getValueByName(_XFadeLength, ".SoundType.XFadeLenght"); // WORKAROUND: Typo in sound assets // Fade in/out flag. formRoot.getValueByName(_DoFadeIn, ".SoundType.DoFadeIn"); formRoot.getValueByName(_DoFadeOut, ".SoundType.DoFadeOut"); diff --git a/code/nel/src/sound/simple_sound.cpp b/code/nel/src/sound/simple_sound.cpp index 393c9daeb..c4c320ea4 100644 --- a/code/nel/src/sound/simple_sound.cpp +++ b/code/nel/src/sound/simple_sound.cpp @@ -38,6 +38,7 @@ CSimpleSound::CSimpleSound() : _Registered(false), _Buffer(NULL), // _Detailed(false), // not used? + _Alpha(1.0), _NeedContext(false) { // init with NULL in case of unexecpted access diff --git a/code/nel/src/sound/stream_file_sound.cpp b/code/nel/src/sound/stream_file_sound.cpp index 83641cdf7..1eb40f4bb 100644 --- a/code/nel/src/sound/stream_file_sound.cpp +++ b/code/nel/src/sound/stream_file_sound.cpp @@ -41,7 +41,7 @@ using namespace std; namespace NLSOUND { -CStreamFileSound::CStreamFileSound() +CStreamFileSound::CStreamFileSound() : m_Async(true) { } diff --git a/code/nel/src/sound/stream_sound.cpp b/code/nel/src/sound/stream_sound.cpp index 21b6de9d0..8933f8be7 100644 --- a/code/nel/src/sound/stream_sound.cpp +++ b/code/nel/src/sound/stream_sound.cpp @@ -18,19 +18,19 @@ #include "nel/sound/stream_sound.h" #if NLSOUND_SHEET_VERSION_BUILT < 2 -# include "nel/sound/group_controller_root.h" +#include "nel/sound/group_controller_root.h" #endif -namespace NLSOUND { +namespace NLSOUND +{ CStreamSound::CStreamSound() + : m_Alpha(1.0f) { - } CStreamSound::~CStreamSound() { - } void CStreamSound::importForm(const std::string &filename, NLGEORGES::UFormElm &root) @@ -49,7 +49,7 @@ void CStreamSound::importForm(const std::string &filename, NLGEORGES::UFormElm & CSound::importForm(filename, root); // MaxDistance - root.getValueByName(_MaxDist, ".SoundType.MaxDistance"); + root.getValueByName(_MaxDist, ".SoundType.MaxDistance"); // MinDistance root.getValueByName(_MinDist, ".SoundType.MinDistance"); @@ -60,7 +60,6 @@ void CStreamSound::importForm(const std::string &filename, NLGEORGES::UFormElm & #if NLSOUND_SHEET_VERSION_BUILT < 2 _GroupController = CGroupControllerRoot::getInstance()->getGroupController(NLSOUND_SHEET_V1_DEFAULT_SOUND_STREAM_GROUP_CONTROLLER); #endif - } void CStreamSound::serial(NLMISC::IStream &s) @@ -71,9 +70,9 @@ void CStreamSound::serial(NLMISC::IStream &s) s.serial(m_Alpha); #if NLSOUND_SHEET_VERSION_BUILT < 2 - if (s.isReading()) _GroupController = CGroupControllerRoot::getInstance()->getGroupController(NLSOUND_SHEET_V1_DEFAULT_SOUND_STREAM_GROUP_CONTROLLER); + if (s.isReading()) + _GroupController = CGroupControllerRoot::getInstance()->getGroupController(NLSOUND_SHEET_V1_DEFAULT_SOUND_STREAM_GROUP_CONTROLLER); #endif - } } /* namespace NLSOUND */