00001 // SuperTux 00002 // Copyright (C) 2006 Matthias Braun <matze@braunis.de> 00003 // 00004 // This program is free software: you can redistribute it and/or modify 00005 // it under the terms of the GNU General Public License as published by 00006 // the Free Software Foundation, either version 3 of the License, or 00007 // (at your option) any later version. 00008 // 00009 // This program is distributed in the hope that it will be useful, 00010 // but WITHOUT ANY WARRANTY; without even the implied warranty of 00011 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00012 // GNU General Public License for more details. 00013 // 00014 // You should have received a copy of the GNU General Public License 00015 // along with this program. If not, see <http://www.gnu.org/licenses/>. 00016 00017 #include "audio/sound_source.hpp" 00018 00019 class DummySoundSource : public SoundSource 00020 { 00021 public: 00022 DummySoundSource() : 00023 is_playing() 00024 {} 00025 virtual ~DummySoundSource() 00026 {} 00027 00028 virtual void play() 00029 { 00030 is_playing = true; 00031 } 00032 00033 virtual void stop() 00034 { 00035 is_playing = false; 00036 } 00037 00038 virtual bool playing() 00039 { 00040 return is_playing; 00041 } 00042 00043 virtual void set_looping(bool ) 00044 { 00045 } 00046 00047 virtual void set_relative(bool ) 00048 { 00049 } 00050 00051 virtual void set_gain(float ) 00052 { 00053 } 00054 00055 virtual void set_pitch(float ) 00056 { 00057 } 00058 00059 virtual void set_position(const Vector& ) 00060 { 00061 } 00062 00063 virtual void set_velocity(const Vector& ) 00064 { 00065 } 00066 00067 virtual void set_reference_distance(float ) 00068 { 00069 } 00070 00071 private: 00072 bool is_playing; 00073 }; 00074 00075 SoundSource* create_dummy_sound_source() 00076 { 00077 return new DummySoundSource(); 00078 } 00079 00080 /* EOF */