1 // This file is part of Dust Racing 2D. 2 // Copyright (C) 2013 Jussi Lind <jussi.lind@iki.fi> 3 // 4 // Dust Racing 2D is free software: you can redistribute it and/or modify 5 // it under the terms of the GNU General Public License as published by 6 // the Free Software Foundation, either version 3 of the License, or 7 // (at your option) any later version. 8 // Dust Racing 2D is distributed in the hope that it will be useful, 9 // but WITHOUT ANY WARRANTY; without even the implied warranty of 10 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 // GNU General Public License for more details. 12 // 13 // You should have received a copy of the GNU General Public License 14 // along with Dust Racing 2D. If not, see <http://www.gnu.org/licenses/>. 15 16 #include "source.hpp" 17 18 namespace STFH { 19 Source()20Source::Source() 21 : m_pitch(1.0) 22 , m_volume(1.0) 23 , m_maxDist(0.0) 24 , m_refDist(0.0) 25 { 26 } 27 setData(DataPtr data)28void Source::setData(DataPtr data) 29 { 30 m_data = data; 31 } 32 setVolume(float volume)33void Source::setVolume(float volume) 34 { 35 m_volume = volume; 36 } 37 volume() const38float Source::volume() const 39 { 40 return m_volume; 41 } 42 setPitch(float pitch)43void Source::setPitch(float pitch) 44 { 45 m_pitch = pitch; 46 } 47 pitch() const48float Source::pitch() const 49 { 50 return m_pitch; 51 } 52 setLocation(const Location & location)53void Source::setLocation(const Location & location) 54 { 55 m_location = location; 56 } 57 location() const58const Location & Source::location() const 59 { 60 return m_location; 61 } 62 setMaxDist(float maxDist)63void Source::setMaxDist(float maxDist) 64 { 65 m_maxDist = maxDist; 66 } 67 setReferenceDist(float refDist)68void Source::setReferenceDist(float refDist) 69 { 70 m_refDist = refDist; 71 } 72 ~Source()73Source::~Source() 74 { 75 } 76 77 } // namespace STFH 78