Logo Search packages:      
Sourcecode: ecasound2.2 version File versions

ECA_CONTROL Class Reference

#include <eca-control.h>

Inheritance diagram for ECA_CONTROL:

ECA_CONTROL_OBJECTS ECA_IAMODE_PARSER ECA_CONTROL_BASE

List of all members.


Detailed Description

Class for controlling the whole ecasound library

Related design patters: Facade (GoF185)

Author:
Kai Vehmanen

Definition at line 20 of file eca-control.h.


Public Member Functions

bool action_requires_connected (int id)
bool action_requires_params (int id)
bool action_requires_selected (int id)
bool action_requires_selected_audio_input (int id)
bool action_requires_selected_audio_output (int id)
bool action_requires_selected_not_connected (int id)
void add_audio_input (const std::string &filename)
void add_audio_output (const std::string &filename)
void add_chain (const std::string &names)
void add_chain_operator (CHAIN_OPERATOR *cotmp)
void add_chain_operator (const std::string &chainop_params)
void add_chains (const std::vector< std::string > &names)
void add_chains (const std::string &names)
void add_chainsetup (const std::string &name)
void add_controller (const std::string &gcontrol_params)
void add_default_output (void)
void attach_audio_input (void)
void attach_audio_output (void)
std::vector< std::string > attached_chains (const std::string &name) const
std::string attached_chains_input (AUDIO_IO *aiod) const
std::string attached_chains_output (AUDIO_IO *aiod) const
std::vector< std::string > audio_input_names (void) const
std::vector< std::string > audio_output_names (void) const
std::vector< std::string > chain_names (void) const
std::vector< std::string > chain_operator_names (void) const
std::vector< std::string > chain_operator_parameter_names (void) const
int chainsetup_buffersize (void) const
const std::string & chainsetup_filename (void) const
std::vector< std::string > chainsetup_names (void) const
double chainsetup_position (double seconds) const
void change_chainsetup_position (double seconds)
void change_chainsetup_position_samples (SAMPLE_SPECS::sample_pos_t samples)
void clear_chains (void)
void connect_chainsetup (void)
std::string connected_chainsetup (void) const
std::vector< std::string > controller_names (void) const
const ECA_AUDIO_FORMATdefault_audio_format (void) const
void deselect_chains (const std::vector< std::string > &chains)
void disconnect_chainsetup (void)
void edit_chainsetup (void)
void engine_start (void)
std::string engine_status (void) const
int float_to_string_precision (void) const
ECA_AUDIO_FORMAT get_audio_format (AUDIO_IO *aobj) const
const AUDIO_IOget_audio_input (void)
const AUDIO_IOget_audio_output (void)
const CHAINget_chain (void) const
const CHAIN_OPERATORget_chain_operator (void) const
CHAIN_OPERATOR::parameter_t get_chain_operator_parameter (void) const
const ECA_CHAINSETUPget_chainsetup (void) const
const ECA_CHAINSETUPget_chainsetup_filename (const std::string &filename) const
const GENERIC_CONTROLLERget_controller (void) const
bool is_connected (void) const
bool is_engine_started (void) const
bool is_finished (void) const
bool is_running (void) const
bool is_selected (void) const
bool is_valid (void) const
const std::string & last_error (void) const
double last_float (void) const
int last_integer (void) const
long int last_long_integer (void) const
const std::string & last_string (void) const
const std::vector< std::string > & last_string_list (void) const
const std::string & last_type (void) const
SAMPLE_SPECS::sample_pos_t length_in_samples (void) const
double length_in_seconds_exact (void) const
void load_chainsetup (const std::string &filename)
SAMPLE_SPECS::sample_pos_t position_in_samples (void) const
double position_in_seconds_exact (void) const
void quit (void)
void remove_audio_input (void)
void remove_audio_output (void)
void remove_chain_operator (void)
void remove_chains (void)
void remove_chainsetup (void)
void remove_controller (void)
void rename_chain (const std::string &name)
std::string resource_value (const std::string &key) const
void run (void)
void save_chainsetup (const std::string &filename)
void select_all_chains (void)
void select_audio_input (const std::string &name)
void select_audio_input_by_index (int index)
void select_audio_output (const std::string &name)
void select_audio_output_by_index (int index)
void select_chain (const std::string &chain)
void select_chain_operator (int chainop_id)
void select_chain_operator_parameter (int param)
void select_chains (const std::vector< std::string > &chains)
void select_chains_by_index (const std::vector< int > &index_numbers)
void select_chainsetup (const std::string &name)
void select_chainsetup_by_index (int index)
void select_controller (int ctrl_id)
int selected_chain_operator (void) const
int selected_chain_operator_parameter (void) const
const std::vector< std::string > & selected_chains (void) const
std::string selected_chainsetup (void) const
int selected_controller (void) const
void set_chain_operator_parameter (CHAIN_OPERATOR::parameter_t value)
void set_chainsetup_buffersize (int bsize)
void set_chainsetup_filename (const std::string &name)
void set_chainsetup_output_mode (int output_mode)
void set_chainsetup_parameter (const std::string &name)
void set_chainsetup_position (double seconds)
void set_chainsetup_position_samples (SAMPLE_SPECS::sample_pos_t samples)
void set_chainsetup_processing_length_in_samples (SAMPLE_SPECS::sample_pos_t value)
void set_chainsetup_processing_length_in_seconds (double value)
void set_chainsetup_sample_format (const std::string &name)
void set_default_audio_format (const ECA_AUDIO_FORMAT &format)
void set_default_audio_format (const std::string &sfrm, int channels, long int srate, bool interleaving)
void set_default_audio_format_to_selected_input (void)
void set_default_audio_format_to_selected_output (void)
void start (void)
void stop (void)
void stop_on_condition (void)
void toggle_chain_bypass (void)
void toggle_chain_muting (void)
void toggle_chainsetup_looping (void)
Public functions for issuing command


void action (int action_id, const std::vector< std::string > &args)
void command (const std::string &cmd)
void command_float_arg (const std::string &cmd, double arg)
Public functions for getting session information


void aio_register (void)
std::string aio_status (void) const
std::string chain_operator_status (void) const
std::string chain_status (void) const
std::string chainsetup_status (void) const
std::string controller_status (void) const
void cop_descriptions (void)
void cop_register (void)
void ctrl_descriptions (void)
void ctrl_register (void)
void ladspa_descriptions (bool use_id)
void ladspa_register (void)
void operator_descriptions_helper (const ECA_OBJECT_MAP &arg, std::string *result)
void preset_descriptions (void)
void preset_register (void)
Constructors and dtors


 ECA_CONTROL (ECA_SESSION *psession)
 ~ECA_CONTROL (void)
Public functions printing status information


std::string last_value_to_string (void)
void print_last_value (void)

Static Public Member Functions

static const std::map
< std::string, int > & 
registered_commands (void)
static std::vector< std::string > registered_commands_list (void)

Protected Types

enum  Commands {
  ec_unknown, ec_help, ec_exit, ec_start,
  ec_stop, ec_run, ec_debug, ec_engine_status,
  ec_engine_launch, ec_engine_halt, ec_cs_add, ec_cs_remove,
  ec_cs_list, ec_cs_select, ec_cs_selected, ec_cs_index_select,
  ec_cs_load, ec_cs_save, ec_cs_save_as, ec_cs_edit,
  ec_cs_is_valid, ec_cs_connect, ec_cs_connected, ec_cs_disconnect,
  ec_cs_set_param, ec_cs_set_audio_format, ec_cs_status, ec_cs_rewind,
  ec_cs_forward, ec_cs_set_position, ec_cs_set_position_samples, ec_cs_get_position,
  ec_cs_get_position_samples, ec_cs_get_length, ec_cs_get_length_samples, ec_cs_set_length,
  ec_cs_set_length_samples, ec_cs_toggle_loop, ec_cs_option, ec_c_add,
  ec_c_remove, ec_c_list, ec_c_select, ec_c_selected,
  ec_c_select_all, ec_c_select_add, ec_c_index_select, ec_c_deselect,
  ec_c_clear, ec_c_rename, ec_c_muting, ec_c_bypass,
  ec_c_status, ec_aio_register, ec_aio_status, ec_ai_add,
  ec_ai_remove, ec_ai_list, ec_ai_select, ec_ai_selected,
  ec_ai_index_select, ec_ai_attach, ec_ai_status, ec_ai_forward,
  ec_ai_rewind, ec_ai_set_position, ec_ai_set_position_samples, ec_ai_get_position,
  ec_ai_get_position_samples, ec_ai_get_length, ec_ai_get_length_samples, ec_ai_get_format,
  ec_ai_wave_edit, ec_ao_add, ec_ao_add_default, ec_ao_remove,
  ec_ao_list, ec_ao_select, ec_ao_selected, ec_ao_index_select,
  ec_ao_attach, ec_ao_status, ec_ao_forward, ec_ao_rewind,
  ec_ao_set_position, ec_ao_set_position_samples, ec_ao_get_position, ec_ao_get_position_samples,
  ec_ao_get_length, ec_ao_get_length_samples, ec_ao_get_format, ec_ao_wave_edit,
  ec_cop_add, ec_cop_remove, ec_cop_list, ec_cop_select,
  ec_cop_selected, ec_cop_set, ec_cop_status, ec_cop_register,
  ec_copp_list, ec_copp_select, ec_copp_selected, ec_copp_set,
  ec_copp_get, ec_ladspa_register, ec_preset_register, ec_ctrl_add,
  ec_ctrl_remove, ec_ctrl_list, ec_ctrl_select, ec_ctrl_selected,
  ec_ctrl_status, ec_ctrl_register, ec_ctrlp_list, ec_ctrlp_select,
  ec_ctrlp_selected, ec_ctrlp_set, ec_ctrlp_get, ec_int_cmd_list,
  ec_int_log_history, ec_int_output_mode_wellformed, ec_int_set_float_to_string_precision, ec_int_set_log_history_length,
  ec_int_version_string, ec_int_version_lib_current, ec_int_version_lib_revision, ec_int_version_lib_age,
  ec_map_cop_list, ec_map_preset_list, ec_map_ladspa_list, ec_map_ladspa_id_list,
  ec_map_ctrl_list, ec_dump_target, ec_dump_status, ec_dump_position,
  ec_dump_length, ec_dump_cs_status, ec_dump_c_selected, ec_dump_ai_selected,
  ec_dump_ai_position, ec_dump_ai_length, ec_dump_ai_open_state, ec_dump_ao_selected,
  ec_dump_ao_position, ec_dump_ao_length, ec_dump_ao_open_state, ec_dump_cop_value
}

Protected Member Functions

void audio_input_as_selected (void)
void audio_output_as_selected (void)
void clear_last_values (void)
void close_engine (void)
std::string float_to_string (double n) const
void forward_audio_object (double seconds)
void rewind_audio_object (double seconds)
void send_chain_commands_to_engine (int command, double value)
void set_audio_object_position (double seconds)
void set_audio_object_position_samples (SAMPLE_SPECS::sample_pos_t samples)
void set_float_to_string_precision (int precision)
void set_last_error (const std::string &s)
void set_last_float (double v)
void set_last_integer (int v)
void set_last_long_integer (long int v)
void set_last_string (const std::string &s)
void set_last_string (const std::list< std::string > &s)
void set_last_string_list (const std::vector< std::string > &s)
void wave_edit_audio_object (void)

Static Protected Member Functions

static int command_to_action_id (const std::string &cmdstring)

Protected Attributes

ECA_ENGINEengine_repp
AUDIO_IOselected_audio_input_repp
AUDIO_IOselected_audio_output_repp
ECA_CHAINSETUPselected_chainsetup_repp
ECA_SESSIONsession_repp

Private Member Functions

void action (int action_id)
std::string chainsetup_details_to_string (const ECA_CHAINSETUP *cs) const
void chainsetup_option (const std::string &cmd)
void check_action_preconditions (int action_id)
void clear_action_arguments (void)
double first_action_argument_as_float (void) const
long int first_action_argument_as_long_int (void) const
SAMPLE_SPECS::sample_pos_t first_action_argument_as_samples (void) const
void set_action_argument (double v)
void set_action_argument (const std::string &s)

Private Attributes

double action_arg_f_rep
bool action_arg_f_set_rep
std::string action_args_rep
bool action_ok
bool action_reconnect
bool action_restart
ECA_CONTROL_DUMP ctrl_dump_rep
bool wellformed_mode_rep

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

Generated by  Doxygen 1.6.0   Back to index