Otclient  14/8/2020
SoundChannel Class Reference

#include <soundchannel.h>

Inheritance diagram for SoundChannel:
Collaboration diagram for SoundChannel:

Public Member Functions

 SoundChannel (int id)
 
SoundSourcePtr play (const std::string &filename, float fadetime=0, float gain=1.0f)
 
void stop (float fadetime=0)
 
void enqueue (const std::string &filename, float fadetime=0, float gain=1.0f)
 
void enable ()
 
void disable ()
 
void setGain (float gain)
 
float getGain ()
 
void setEnabled (bool enable)
 
bool isEnabled ()
 
int getId ()
 
- 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

void update ()
 

Friends

class SoundManager
 

Detailed Description

Definition at line 29 of file soundchannel.h.

Constructor & Destructor Documentation

◆ SoundChannel()

SoundChannel::SoundChannel ( int  id)
inline

Definition at line 32 of file soundchannel.h.

Member Function Documentation

◆ disable()

void SoundChannel::disable ( )
inline

Definition at line 38 of file soundchannel.h.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ enable()

void SoundChannel::enable ( )
inline

Definition at line 37 of file soundchannel.h.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ enqueue()

void SoundChannel::enqueue ( const std::string &  filename,
float  fadetime = 0,
float  gain = 1.0f 
)

Definition at line 53 of file soundchannel.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ getGain()

float SoundChannel::getGain ( )
inline

Definition at line 41 of file soundchannel.h.

Here is the caller graph for this function:

◆ getId()

int SoundChannel::getId ( )
inline

Definition at line 46 of file soundchannel.h.

Here is the caller graph for this function:

◆ isEnabled()

bool SoundChannel::isEnabled ( )
inline

Definition at line 44 of file soundchannel.h.

Here is the caller graph for this function:

◆ play()

SoundSourcePtr SoundChannel::play ( const std::string &  filename,
float  fadetime = 0,
float  gain = 1.0f 
)

Definition at line 27 of file soundchannel.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ setEnabled()

void SoundChannel::setEnabled ( bool  enable)

Definition at line 75 of file soundchannel.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ setGain()

void SoundChannel::setGain ( float  gain)

Definition at line 92 of file soundchannel.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ stop()

void SoundChannel::stop ( float  fadetime = 0)

Definition at line 39 of file soundchannel.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ update()

void SoundChannel::update ( )
protected

Definition at line 62 of file soundchannel.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

Friends And Related Function Documentation

◆ SoundManager

friend class SoundManager
friend

Definition at line 50 of file soundchannel.h.


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