1 // NeL - MMORPG Framework <https://wiki.ryzom.dev/>
2 // Copyright (C) 2010-2019 Jan BOON (Kaetemi) <jan.boon@kaetemi.be>
4 // This source file has been modified by the following contributors:
5 // Copyright (C) 2010 Matt RAYKOWSKI (sfb) <matt.raykowski@gmail.com>
7 // This program is free software: you can redistribute it and/or modify
8 // it under the terms of the GNU Affero General Public License as
9 // published by the Free Software Foundation, either version 3 of the
10 // License, or (at your option) any later version.
12 // This program is distributed in the hope that it will be useful,
13 // but WITHOUT ANY WARRANTY; without even the implied warranty of
14 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 // GNU Affero General Public License for more details.
17 // You should have received a copy of the GNU Affero General Public License
18 // along with this program. If not, see <http://www.gnu.org/licenses/>.
21 #include "nel/sound/stream_sound.h"
23 #if NLSOUND_SHEET_VERSION_BUILT < 2
24 #include "nel/sound/group_controller_root.h"
30 CStreamSound::CStreamSound()
35 CStreamSound::~CStreamSound()
39 void CStreamSound::importForm(const std::string
&filename
, NLGEORGES::UFormElm
&root
)
41 // cannot do this debug check because used also by CStreamFileSound
42 /*NLGEORGES::UFormElm *psoundType;
45 // some basic checking.
46 root.getNodeByName(&psoundType, ".SoundType");
47 nlassert(psoundType != NULL);
48 psoundType->getDfnName(dfnName);
49 nlassert(dfnName == "stream_sound.dfn");*/
51 // Call the base class
52 CSound::importForm(filename
, root
);
55 root
.getValueByName(_MaxDist
, ".SoundType.MaxDistance");
58 root
.getValueByName(_MinDist
, ".SoundType.MinDistance");
61 root
.getValueByName(m_Alpha
, ".SoundType.Alpha");
63 #if NLSOUND_SHEET_VERSION_BUILT < 2
64 _GroupController
= CGroupControllerRoot::getInstance()->getGroupController(NLSOUND_SHEET_V1_DEFAULT_SOUND_STREAM_GROUP_CONTROLLER
);
68 void CStreamSound::serial(NLMISC::IStream
&s
)
75 #if NLSOUND_SHEET_VERSION_BUILT < 2
77 _GroupController
= CGroupControllerRoot::getInstance()->getGroupController(NLSOUND_SHEET_V1_DEFAULT_SOUND_STREAM_GROUP_CONTROLLER
);
81 } /* namespace NLSOUND */