ess_channel - RoseLeBlood/openess GitHub Wiki
OpenESS Channel
source file: ess_channel.h
ess_object
class ess_channel :all openess modules have n inputs channels or / and n outputs channels You can connect a input channel with a output channel.
The class is abstract you muss override the functions read
constructor
basic constructor with no parameters
set ess_object name to "ess_channel"
- ess_channel();
name param [in] human readelble name for the channel
type param [in] type of the channel - input or output
set ess_object name to name
- ess_channel(std::string name, ess_channel_t type);
name param [in] human readelble name for the channel
type param [in] type of the channel
channel param [in] which channel
- ess_channel(std::string name, ess_channel_t type, ess_audio_channel_t channel);
public functions
get the using channel (id)
return the using channel
- ess_audio_channel get_channel();
get the type of the channel
return the type of the channel
- ess_channel_t get_type();
is the channel a input channel
return true when channel is a input channel
return false the channel is not a input channel
- bool is_input();
is the channel a output channel
return true when channel is a output channel
return false the channel is not a output channel
- bool is_output();
is the channel invalid
return true the channel is not a input or output channel
return false the channel is valid
- bool is_invalid();
read from channel the output object read from input
sub class must ovveride this function
buffer param [out] the pointer to write the data to
offset param [in] the readed offset
- virtual unsigned int read(ess_audioblock_t block, unsigned int offset) = 0;
channel name and other informations to string
return the channel string
- virtual std::string to_string();
protected functions
set the channel id
channel param [in] id the new channel
- void set_channel(const ess_audio_channel channel);
set the type of this channel
name param [in] the new type of this channel
- void set_type(const ess_channel_t type);
protected member
the channel id
- ess_audio_channel m_iChannel;
the channel type
- ess_channel_t m_eType;
the using channel mutex
- ess_mutex m_mutex;