1 // 2 // SuperTuxKart - a fun racing game with go-kart 3 // Copyright (C) 2006-2015 Patrick Ammann <pammann@aro.ch> 4 // Copyright (C) 2008-2015 Joerg Henrichs, Patrick Ammann 5 // 6 // This program is free software; you can redistribute it and/or 7 // modify it under the terms of the GNU General Public License 8 // as published by the Free Software Foundation; either version 3 9 // of the License, or (at your option) any later version. 10 // 11 // This program is distributed in the hope that it will be useful, 12 // but WITHOUT ANY WARRANTY; without even the implied warranty of 13 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 // GNU General Public License for more details. 15 // 16 // You should have received a copy of the GNU General Public License 17 // along with this program; if not, write to the Free Software 18 // Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 19 20 #ifndef HEADER_DUMMY_SFX_HPP 21 #define HEADER_DUMMY_SFX_HPP 22 23 #include "audio/sfx_base.hpp" 24 #include "utils/cpp2011.hpp" 25 26 /** 27 * \brief Dummy sound when ogg or openal aren't available 28 * \ingroup audio 29 */ 30 class DummySFX : public SFXBase 31 { 32 public: DummySFX(SFXBuffer * buffer,bool positional,float gain)33 DummySFX(SFXBuffer* buffer, bool positional, 34 float gain) {} ~DummySFX()35 virtual ~DummySFX() {} 36 37 /** Late creation, if SFX was initially disabled */ init()38 virtual bool init() OVERRIDE { return true; } isLooped()39 virtual bool isLooped() OVERRIDE { return false; } updatePlayingSFX(float dt)40 virtual void updatePlayingSFX(float dt) OVERRIDE {} setLoop(bool status)41 virtual void setLoop(bool status) OVERRIDE {} reallySetLoop(bool status)42 virtual void reallySetLoop(bool status) OVERRIDE {} setPosition(const Vec3 & p)43 virtual void setPosition(const Vec3 &p) OVERRIDE {} reallySetPosition(const Vec3 & p)44 virtual void reallySetPosition(const Vec3 &p) OVERRIDE {} setSpeedPosition(float factor,const Vec3 & p)45 virtual void setSpeedPosition(float factor, 46 const Vec3 &p) OVERRIDE {} reallySetSpeedPosition(float f,const Vec3 & p)47 virtual void reallySetSpeedPosition(float f, 48 const Vec3 &p) OVERRIDE {} play()49 virtual void play() OVERRIDE {} reallyPlayNow(SFXBuffer * buffer=NULL)50 virtual void reallyPlayNow(SFXBuffer* buffer = NULL) OVERRIDE {} play(const Vec3 & xyz,SFXBuffer * buffer=NULL)51 virtual void play(const Vec3 &xyz, SFXBuffer* buffer = NULL) OVERRIDE {} reallyPlayNow(const Vec3 & xyz,SFXBuffer * buffer=NULL)52 virtual void reallyPlayNow(const Vec3 &xyz, SFXBuffer* buffer = NULL) OVERRIDE {} stop()53 virtual void stop() OVERRIDE {} reallyStopNow()54 virtual void reallyStopNow() OVERRIDE {} pause()55 virtual void pause() OVERRIDE {} reallyPauseNow()56 virtual void reallyPauseNow() OVERRIDE {} resume()57 virtual void resume() OVERRIDE {} reallyResumeNow()58 virtual void reallyResumeNow() OVERRIDE {} deleteSFX()59 virtual void deleteSFX() OVERRIDE {} setSpeed(float factor)60 virtual void setSpeed(float factor) OVERRIDE {} reallySetSpeed(float factor)61 virtual void reallySetSpeed(float factor) OVERRIDE {} setVolume(float gain)62 virtual void setVolume(float gain) OVERRIDE {} reallySetVolume(float gain)63 virtual void reallySetVolume(float gain) OVERRIDE {} setMasterVolume(float gain)64 virtual void setMasterVolume(float gain) OVERRIDE {} reallySetMasterVolumeNow(float gain)65 virtual void reallySetMasterVolumeNow(float gain) OVERRIDE {} getStatus()66 virtual SFXStatus getStatus() OVERRIDE { return SFX_STOPPED; } onSoundEnabledBack()67 virtual void onSoundEnabledBack() OVERRIDE {} setRolloff(float rolloff)68 virtual void setRolloff(float rolloff) OVERRIDE {} getBuffer() const69 virtual const SFXBuffer* getBuffer() const OVERRIDE { return NULL; } 70 71 }; // DummySFX 72 73 74 #endif // HEADER_SFX_HPP 75 76