Main Page | Namespace List | Class Hierarchy | Class List | Directories | Namespace Members | Class Members

CHAIN Class Reference

Class representing an abstract audio signal chain. More...

Inheritance diagram for CHAIN:

ECA_AUDIO_POSITION ECA_SAMPLERATE_AWARE List of all members.

Public Member Functions

bool is_initialized (void) const
bool is_muted (void) const
bool is_processing (void) const
void toggle_muting (bool v)
void toggle_processing (bool v)
std::string name (void) const
void name (const std::string &c)
bool is_valid (void) const
 Whether chain is in a valid state (= ready for processing)?
void connect_input (int input)
 Connects input to chain.
void disconnect_input (void)
 Disconnects input.
void connect_output (int output)
 Connects output to chain.
void disconnect_output (void)
 Disconnects output.
void disconnect_buffer (void)
 Disconnects the sample buffer.
int connected_input (void) const
 Returns an id number to input connected to this chain.
int connected_output (void) const
 Returns an id number to output connected to this chain.
void clear (void)
 Clears chain (removes all chain operators and controllers).
void add_chain_operator (CHAIN_OPERATOR *chainop)
 Adds the chain operator to the end of the chain.
void remove_chain_operator (void)
 Removes the selected chain operator.
void select_chain_operator (int index)
 Selects a chain operator.
void select_chain_operator_parameter (int index)
 Selects a chain operator parameter.
void set_parameter (CHAIN_OPERATOR::parameter_t value)
 Sets the parameter value (selected chain operator).
int selected_chain_operator (void) const
 Index of selected chain operator.
int selected_chain_operator_parameter (void) const
int number_of_chain_operators (void) const
int number_of_chain_operator_parameters (void) const
 Returns the total number of parameters for the selected chain operator.
CHAIN_OPERATOR::parameter_t get_parameter (void) const
 Gets the parameter value (selected chain operator).
std::string chain_operator_name (void) const
 Returns the name of selected chain operator.
std::string chain_operator_parameter_name (void) const
 Returns the name of selected chain operator parameter.
const CHAIN_OPERATORget_chain_operator (int index) const
const CHAIN_OPERATORget_selected_chain_operator (void) const
void add_controller (GENERIC_CONTROLLER *gcontroller)
 Adds a generic controller and assign it to selected dynamic object.
void remove_controller (void)
 Removes the selected controller.
void select_controller (int index)
 Selects a controller.
void select_controller_parameter (int index)
 Selects a controller parameter.
const GENERIC_CONTROLLERget_controller (int index) const
const GENERIC_CONTROLLERget_selected_controller (void) const
int selected_controller (void) const
 Index of selected chain operator.
int selected_controller_parameter (void) const
int number_of_controllers (void) const
std::string controller_name (void) const
 Returns the name of selected controller.
void selected_chain_operator_as_target (void)
 Use current selected chain operator as target for parameters control.
void selected_controller_as_target (void)
 Use current selected controller as target for parameter control.
OPERATORselected_target (void) const
 Returns the object that is the current target for parameter control, or 0 if none selected.
void init (SAMPLE_BUFFER *sbuf=0, int in_channels=0, int out_channels=0)
 Prepares chain for processing.
void release (void)
 Releases all buffers assigned to chain operators.
void process (void)
 Processes chain data with all chain operators.
void controller_update (void)
 Calculates/fetches new values for all controllers.
void refresh_parameters (void)
 Re-initializes all effect parameters.
std::string to_string (void) const
 Converts chain to a formatted string.
std::string chain_operator_to_string (CHAIN_OPERATOR *chainop) const
 Makes an EOS-compatible option describing the current state of chain operator 'gctrl'.
std::string controller_to_string (GENERIC_CONTROLLER *gctrl) const
 Makes an EOS-compatible option describing the current state of controller object 'gctrl'.
std::string operator_parameters_to_string (const OPERATOR *chainop) const
 Makes an EOS-compatible, comma-separated list of parameter values for chain operator 'chainop'.
Functions implemented from ECA_SAMPLERATE_AWARE
virtual void set_samples_per_second (SAMPLE_SPECS::sample_rate_t v)
 Reimplemented from ECA_SAMPLERATE_AWARE.
Functions implemented from ECA_AUDIO_POSITION
virtual void seek_position (void)
 Reimplemented from ECA_AUDIO_POSITION.

Detailed Description

Class representing an abstract audio signal chain.


Member Function Documentation

void CHAIN::add_chain_operator CHAIN_OPERATOR chainop  ) 
 

Adds the chain operator to the end of the chain.

require: chainop != 0

ensure: selected_chain_operator() == number_of_chain_operators() is_processing() is_initialized() != true

void CHAIN::add_controller GENERIC_CONTROLLER gcontroller  ) 
 

Adds a generic controller and assign it to selected dynamic object.

require: gcontroller != 0 selected_dynobj != 0

string CHAIN::chain_operator_name void   )  const
 

Returns the name of selected chain operator.

require: selected_chain_operator() != 0

string CHAIN::chain_operator_parameter_name void   )  const
 

Returns the name of selected chain operator parameter.

require: selected_chain_operator() != 0 selected_chain_operator_parameter() != 0

int CHAIN::connected_input void   )  const [inline]
 

Returns an id number to input connected to this chain.

If no input is connected, -1 is returned.

int CHAIN::connected_output void   )  const [inline]
 

Returns an id number to output connected to this chain.

If no input is connected, -1 is returned.

string CHAIN::controller_name void   )  const
 

Returns the name of selected controller.

require: selected_controller() != 0

CHAIN_OPERATOR::parameter_t CHAIN::get_parameter void   )  const
 

Gets the parameter value (selected chain operator).

Parameters:
index parameter number
require: selected_chain_operator_parameter() > 0 && selected_chain_operator() != 0

void CHAIN::init SAMPLE_BUFFER sbuf = 0,
int  in_channels = 0,
int  out_channels = 0
 

Prepares chain for processing.

All further processing will be done using the buffer pointer by 'sbuf'. If all parameters are zero, previously specified parameters are used (state re-initialization).

require: input_id != 0 || in_channels != 0 output_id != 0 || out_channels != 0 audioslot_repp != 0 || sbuf != 0

ensure: is_initialized() == true

int CHAIN::number_of_chain_operator_parameters void   )  const
 

Returns the total number of parameters for the selected chain operator.

require: selected_chain_operator() != 0

void CHAIN::process void   ) 
 

Processes chain data with all chain operators.

require: is_initialized() == true

void CHAIN::remove_chain_operator void   ) 
 

Removes the selected chain operator.

require: selected_chain_operator() <= number_of_chain_operators(); selected_chain_operator() > 0

ensure: (chainsops.size() == 0 && is_processing()) || (chainsops.size() != 0 && !is_processing()) && is_initialized() != true

void CHAIN::remove_controller void   ) 
 

Removes the selected controller.

require: selected_controller() <= number_of_controllers(); selected_controller() > 0

void CHAIN::select_chain_operator int  index  ) 
 

Selects a chain operator.

If no chain operators are found with 'index', with index 'index'.

require: index > 0

ensure: index == selected_chain_operator() || selected_chain_operator() == 0

void CHAIN::select_chain_operator_parameter int  index  ) 
 

Selects a chain operator parameter.

require: index > 0 selected_chain_operator() != 0 index <= selected_chain_operator()->number_of_params()

ensure: index == selected_chain_operator_parameter()

void CHAIN::select_controller int  index  ) 
 

Selects a controller.

require: index > 0

ensure: index == selected_controller() || selected_controller() == 0

void CHAIN::select_controller_parameter int  index  ) 
 

Selects a controller parameter.

require: index > 0 selected_controller() != 0 index <= selected_controller()->number_of_params()

ensure: index == selected_controller_parameter()

void CHAIN::selected_chain_operator_as_target void   ) 
 

Use current selected chain operator as target for parameters control.

require: selected_chain_operator() != 0

ensure: selected_target() == selected_chain_operator()

void CHAIN::selected_controller_as_target void   ) 
 

Use current selected controller as target for parameter control.

require: selected_controller() != 0

ensure: selected_target() == selected_controller()

void CHAIN::set_parameter CHAIN_OPERATOR::parameter_t  value  ) 
 

Sets the parameter value (selected chain operator).

Parameters:
index parameter number
value new value
require: selected_chainop_number > 0 && selected_chainop_number <= number_of_chain_operators() && selected_chain_operator_parameter() > 0


The documentation for this class was generated from the following files:
Generated on Fri Apr 8 01:37:51 2005 for libecasound by  doxygen 1.4.1