Home | Namespaces | Hierarchy | Alphabetical List | Class list | Files | Namespace Members | Class members | File members |
00001 // Copyright (c) 2007-2008 Tomer Nosrati 00002 // This file is part of the "NUSoftware Game Engine". 00003 // For conditions of distribution and use, see copyright notice in nge.hpp 00004 00005 #pragma once 00006 #ifndef __I_PLAYED_SOUND_H__ 00007 #define __I_PLAYED_SOUND_H__ 00008 00009 #include "ISoundObj.hpp" 00010 #include "Irrlicht/irrlicht.h" 00011 00012 using namespace irr; 00013 using namespace irr::core; 00014 00015 namespace nge 00016 { 00017 namespace audio 00018 { 00019 00020 class IPlayedSound : public virtual IReferenceCounted 00021 { 00022 public: 00024 IPlayedSound() : m_pSoundObj(0) {} 00025 00027 virtual ~IPlayedSound() 00028 { 00029 // stop(); 00030 00031 if(m_pSoundObj) 00032 { 00033 m_pSoundObj->drop(); 00034 m_pSoundObj = 0; 00035 } 00036 } 00037 00038 virtual ISoundObj* getSoundObj() = 0; 00039 00040 virtual void setIsPaused(bool paused = true) = 0; 00041 00042 virtual bool getIsPaused() = 0; 00043 00044 virtual void stop() = 0; 00045 00046 virtual f32 getVolume() = 0; 00047 00048 virtual void setVolume(f32 volume) = 0; 00049 00050 virtual void setPan(f32 pan) = 0; 00051 00052 virtual f32 getPan() = 0; 00053 00054 virtual bool isLooped() = 0; 00055 00056 virtual void setIsLooped(bool looped) = 0; 00057 00058 virtual bool isFinished() = 0; 00059 00060 virtual void setMinDistance(f32 min) = 0; 00061 00062 virtual f32 getMinDistance() = 0; 00063 00064 virtual void setMaxDistance(f32 max) = 0; 00065 00066 virtual f32 getMaxDistance() = 0; 00067 00068 virtual void setPosition(vector3df position) = 0; 00069 00070 virtual vector3df getPosition() = 0; 00071 00072 virtual void setVelocity(vector3df& vel) = 0; 00073 00074 virtual vector3df getVelocity() = 0; 00075 00076 virtual u32 getPlayPosition() = 0; 00077 00078 virtual bool setPlayPosition(u32 pos) = 0; 00079 00080 virtual bool setPlaybackSpeed(f32 speed = 1.f) = 0; 00081 00082 virtual f32 getPlaybackSpeed() = 0; 00083 00084 virtual u32 getPlayLength() = 0; 00085 00086 protected: 00087 ISoundObj* m_pSoundObj; 00088 }; 00089 00090 } // namespace audio 00091 } // namespace nge 00092 00093 #endif // __I_PLAYED_SOUND_H__
The NUSoftware Game Engine Documentation © 2007-2008 by Tomer Nosrati. Generated
on Sat Apr 26 16:52:34 2008 by Doxygen
(1.5.5) |