Otclient  14/8/2020
CombinedSoundSource Class Reference

#include <combinedsoundsource.h>

Inheritance diagram for CombinedSoundSource:
Collaboration diagram for CombinedSoundSource:

Public Member Functions

 CombinedSoundSource ()
 
void addSource (const SoundSourcePtr &source)
 
std::vector< SoundSourcePtrgetSources ()
 
void play ()
 
void stop ()
 
bool isBuffering ()
 
bool isPlaying ()
 
void setLooping (bool looping)
 
void setRelative (bool relative)
 
void setReferenceDistance (float distance)
 
void setGain (float gain)
 
void setPitch (float pitch)
 
void setPosition (const Point &pos)
 
void setVelocity (const Point &velocity)
 
void setFading (FadeState state, float fadetime)
 
- Public Member Functions inherited from SoundSource
 SoundSource ()
 
virtual ~SoundSource ()
 
void setName (const std::string &name)
 
std::string getName ()
 
uchar getChannel ()
 
float getGain ()
 
- Public Member Functions inherited from LuaObject
 LuaObject ()
 
virtual ~LuaObject ()
 
template<typename T >
void connectLuaField (const std::string &field, const std::function< T > &f, bool pushFront=false)
 
template<typename... T>
int luaCallLuaField (const std::string &field, const T &... args)
 
template<typename R , typename... T>
callLuaField (const std::string &field, const T &... args)
 
template<typename... T>
void callLuaField (const std::string &field, const T &... args)
 
bool hasLuaField (const std::string &field)
 Returns true if the lua field exists. More...
 
template<typename T >
void setLuaField (const std::string &key, const T &value)
 Sets a field in this lua object. More...
 
template<typename T >
getLuaField (const std::string &key)
 Gets a field from this lua object. More...
 
void releaseLuaFieldsTable ()
 Release fields table reference. More...
 
void luaSetField (const std::string &key)
 Sets a field from this lua object, the value must be on the stack. More...
 
void luaGetField (const std::string &key)
 Gets a field from this lua object, the result is pushed onto the stack. More...
 
void luaGetMetatable ()
 Get object's metatable. More...
 
void luaGetFieldsTable ()
 Gets the table containing all stored fields of this lua object, the result is pushed onto the stack. More...
 
int getUseCount ()
 
std::string getClassName ()
 Returns the derived class name, its the same name used in Lua. More...
 
LuaObjectPtr asLuaObject ()
 
void operator= (const LuaObject &)
 
- Public Member Functions inherited from stdext::shared_object
 shared_object ()
 
virtual ~shared_object ()
 
void add_ref ()
 
void dec_ref ()
 
refcount_t ref_count ()
 
template<typename T >
stdext::shared_object_ptr< T > static_self_cast ()
 
template<typename T >
stdext::shared_object_ptr< T > dynamic_self_cast ()
 
template<typename T >
stdext::shared_object_ptr< T > const_self_cast ()
 

Protected Member Functions

virtual void update ()
 
- Protected Member Functions inherited from SoundSource
 SoundSource (uint sourceId)
 
void setBuffer (const SoundBufferPtr &buffer)
 
void setChannel (uchar channel)
 

Additional Inherited Members

- Public Types inherited from SoundSource
enum  FadeState { NoFading, FadingOn, FadingOff }
 
- Protected Attributes inherited from SoundSource
uint m_sourceId
 
uchar m_channel
 
std::string m_name
 
SoundBufferPtr m_buffer
 
FadeState m_fadeState
 
float m_fadeStartTime
 
float m_fadeTime
 
float m_fadeGain
 
float m_gain
 

Detailed Description

Definition at line 28 of file combinedsoundsource.h.

Constructor & Destructor Documentation

◆ CombinedSoundSource()

CombinedSoundSource::CombinedSoundSource ( )

Definition at line 25 of file combinedsoundsource.cpp.

Member Function Documentation

◆ addSource()

void CombinedSoundSource::addSource ( const SoundSourcePtr source)

Definition at line 29 of file combinedsoundsource.cpp.

◆ getSources()

std::vector<SoundSourcePtr> CombinedSoundSource::getSources ( )
inline

Definition at line 34 of file combinedsoundsource.h.

◆ isBuffering()

bool CombinedSoundSource::isBuffering ( )
virtual

Reimplemented from SoundSource.

Definition at line 46 of file combinedsoundsource.cpp.

◆ isPlaying()

bool CombinedSoundSource::isPlaying ( )
virtual

Reimplemented from SoundSource.

Definition at line 55 of file combinedsoundsource.cpp.

◆ play()

void CombinedSoundSource::play ( )
virtual

Reimplemented from SoundSource.

Definition at line 34 of file combinedsoundsource.cpp.

◆ setFading()

void CombinedSoundSource::setFading ( SoundSource::FadeState  state,
float  fadetime 
)
virtual

Reimplemented from SoundSource.

Definition at line 106 of file combinedsoundsource.cpp.

◆ setGain()

void CombinedSoundSource::setGain ( float  gain)
virtual

Reimplemented from SoundSource.

Definition at line 82 of file combinedsoundsource.cpp.

◆ setLooping()

void CombinedSoundSource::setLooping ( bool  looping)
virtual

Reimplemented from SoundSource.

Definition at line 64 of file combinedsoundsource.cpp.

◆ setPitch()

void CombinedSoundSource::setPitch ( float  pitch)
virtual

Reimplemented from SoundSource.

Definition at line 88 of file combinedsoundsource.cpp.

◆ setPosition()

void CombinedSoundSource::setPosition ( const Point pos)
virtual

Reimplemented from SoundSource.

Definition at line 94 of file combinedsoundsource.cpp.

◆ setReferenceDistance()

void CombinedSoundSource::setReferenceDistance ( float  distance)
virtual

Reimplemented from SoundSource.

Definition at line 76 of file combinedsoundsource.cpp.

◆ setRelative()

void CombinedSoundSource::setRelative ( bool  relative)
virtual

Reimplemented from SoundSource.

Definition at line 70 of file combinedsoundsource.cpp.

◆ setVelocity()

void CombinedSoundSource::setVelocity ( const Point velocity)
virtual

Reimplemented from SoundSource.

Definition at line 100 of file combinedsoundsource.cpp.

◆ stop()

void CombinedSoundSource::stop ( )
virtual

Reimplemented from SoundSource.

Definition at line 40 of file combinedsoundsource.cpp.

◆ update()

void CombinedSoundSource::update ( )
protectedvirtual

Reimplemented from SoundSource.

Definition at line 112 of file combinedsoundsource.cpp.


The documentation for this class was generated from the following files: