/** * \file stream_file_sound.cpp * \brief CStreamFileSound * \date 2012-04-11 09:57GMT * \author Jan Boon (Kaetemi) * CStreamFileSound */ /* * Copyright (C) 2012 by authors * * This file is part of RYZOM CORE. * RYZOM CORE is free software: you can redistribute it and/or modify * it under the terms of the GNU Affero General Public License as * published by the Free Software Foundation, either version 3 of the * License, or (at your option) any later version. * * RYZOM CORE is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Affero General Public License for more details. * * You should have received a copy of the GNU Affero General Public * License along with RYZOM CORE. If not, see * . */ #include "stdsound.h" #include // STL includes // NeL includes // #include // Project includes using namespace std; // using namespace NLMISC; namespace NLSOUND { CStreamFileSound::CStreamFileSound() { } CStreamFileSound::~CStreamFileSound() { } void CStreamFileSound::importForm(const std::string &filename, NLGEORGES::UFormElm &root) { // Call the base class CStreamSound::importForm(filename, root); // Async root.getValueByName(m_Async, ".SoundType.Async"); // FilePath root.getValueByName(m_FilePath, ".SoundType.FilePath"); } void CStreamFileSound::serial(NLMISC::IStream &s) { CStreamSound::serial(s); s.serial(m_Async); s.serial(m_FilePath); } void CStreamFileSound::setMusicFilePath(const std::string &filePath, bool async, bool loop) { _ConeInnerAngle = NLMISC::Pi * 2; _ConeOuterAngle = NLMISC::Pi * 2; _Looping = loop; _Gain = 1.0f; _ConeOuterGain = 1.0f; _Direction = NLMISC::CVector(0.f, 0.f, 0.f); _Pitch = 1.0f; _Priority = HighestPri; _MaxDist = 9000.0f; _MinDist = 1000.0f; m_Async = async; m_FilePath = filePath; } } /* namespace NLSOUND */ /* end of file */