Logo Search packages:      
Sourcecode: ecasound version File versions  Download package


ECA_CHAINSETUP Class Reference

#include <eca-chainsetup.h>

Inheritance diagram for ECA_CHAINSETUP:
Inheritance graph
Collaboration diagram for ECA_CHAINSETUP:
Collaboration graph

List of all members.

Public Member Functions

Functions for init and cleanup
 ECA_CHAINSETUP (const vector< string > &options)
 ECA_CHAINSETUP (const string &setup_file)
virtual ~ECA_CHAINSETUP (void)
Functions for handling chains
void add_default_chain (void)
void add_new_chains (const vector< string > &newchains)
void remove_chains (void)
void select_chains (const vector< string > &chainsarg)
void select_all_chains (void)
void clear_chains (void)
void rename_chain (const string &name)
void toggle_chain_muting (void)
void toggle_chain_bypass (void)
const vector< string > & selected_chains (void) const
unsigned int first_selected_chain (void) const
vector< string > chain_names (void) const
vector< string > get_attached_chains_to_iodev (const string &filename) const
const CHAINget_chain_with_name (const string &name) const
int get_chain_index (const string &name) const
Functions for handling MIDI-objects
void add_midi_device (MIDI_IO *mididev)
void remove_midi_device (const string &name)
void add_default_midi_device (void)
Functions for chain operators
void add_chain_operator (CHAIN_OPERATOR *cotmp)
void add_controller (GENERIC_CONTROLLER *csrc)
void set_target_to_controller (void)
Functions for configuration (default values, settings)
void toggle_precise_sample_rates (bool value)
void toggle_ignore_xruns (bool v)
void set_output_openmode (int value)
void set_default_audio_format (ECA_AUDIO_FORMAT &value)
void set_default_midi_device (const string &name)
void set_buffering_mode (Buffering_mode_t value)
void set_audio_io_manager_option (const string &mgrname, const string &optionstr)
void set_mix_mode (Mix_mode_t value)
bool precise_sample_rates (void) const
bool ignore_xruns (void) const
const ECA_AUDIO_FORMATdefault_audio_format (void) const
const string & default_midi_device (void) const
int output_openmode (void) const
Buffering_mode_t buffering_mode (void) const
bool is_valid_for_connection (bool verbose) const
bool multitrack_mode (void) const
long int multitrack_mode_offset (void) const
Mix_mode_t mix_mode (void) const
Functions for overriding current buffering mode parameters
void set_buffersize (long int value)
void toggle_raised_priority (bool value)
void set_sched_priority (int value)
void toggle_double_buffering (bool value)
void set_double_buffer_size (long int v)
void toggle_max_buffers (bool v)
long int buffersize (void) const
bool raised_priority (void) const
int get_sched_priority (void) const
bool double_buffering (void) const
long int double_buffer_size (void) const
bool max_buffers (void) const
Functions that modify current state
void set_name (const string &str)
void set_filename (const string &str)
void enable (void) throw (ECA_ERROR&)
void disable (void)
const string & name (void) const
const string & filename (void) const
bool execute_edit (const ECA::chainsetup_edit_t &edit)
Functions implemented from ECA_SAMPLERATE_AWARE
virtual void set_samples_per_second (SAMPLE_SPECS::sample_rate_t v)
Functions implemented from ECA_AUDIO_POSITION
virtual SAMPLE_SPECS::sample_pos_t seek_position (SAMPLE_SPECS::sample_pos_t pos)
Functions for observing current state
bool is_enabled (void) const
bool is_locked (void) const
bool is_valid (void) const
bool has_realtime_objects (void) const
bool has_nonrealtime_objects (void) const
string options_to_string (void) const
Functions for string->state conversions
bool interpret_result (void) const
const string & interpret_result_verbose (void) const
void interpret_option (const string &arg)
void interpret_global_option (const string &arg)
void interpret_object_option (const string &arg)
void interpret_options (const vector< string > &opts)
Functions for string<->state conversions
void save (void) throw (ECA_ERROR&)
void save_to_file (const string &filename) throw (ECA_ERROR&)
Public getter/setter functions for max length information.

Note that this length information is different from that defined in ECA_AUDIO_POSITION. Max length can be set by the users of this class, and can be either shorter or longer than the actual length.

void set_max_length_in_samples (SAMPLE_SPECS::sample_pos_t pos)
void set_max_length_in_seconds (double pos_in_seconds)
bool is_over_max_length (void) const
SAMPLE_SPECS::sample_pos_t max_length_in_samples (void) const
double max_length_in_seconds_exact (void) const
bool max_length_set (void) const
Functions implemented from ECA_AUDIO_POSITION
virtual bool supports_seeking (void) const
virtual bool supports_seeking_sample_accurate (void) const
Public functions for getting length information
SAMPLE_SPECS::sample_pos_t length_in_samples (void) const
int length_in_seconds (void) const
double length_in_seconds_exact (void) const
bool length_set (void) const
Public functions for getting position information
SAMPLE_SPECS::sample_pos_t position_in_samples (void) const
int position_in_seconds (void) const
double position_in_seconds_exact (void) const
Public functions for setting position (with action)
void seek_position_in_samples (SAMPLE_SPECS::sample_pos_t pos_in_samples)
void seek_position_in_samples_advance (SAMPLE_SPECS::sample_pos_t pos_in_samples)
void seek_position_in_seconds (double pos_in_seconds)
void seek_first (void)
void seek_last (void)
Public utility functions
bool out_position (void) const
Public functions for getting audio format information
SAMPLE_SPECS::sample_rate_t samples_per_second (void) const

Protected Member Functions

Protected functions for controlling looping
void toggle_looping (bool v)
bool looping_enabled (void) const
Protected functions for setting length
void set_length_in_samples (SAMPLE_SPECS::sample_pos_t pos)
void set_length_in_seconds (int pos_in_seconds)
void set_length_in_seconds (double pos_in_seconds)
void extend_position (void)
Protected functions for setting position (without action)
void set_position_in_samples (SAMPLE_SPECS::sample_pos_t pos)
void set_position_in_seconds (int pos_in_seconds)
void set_position_in_seconds (double pos_in_seconds)
void change_position_in_samples (SAMPLE_SPECS::sample_pos_t pos)
void change_position_in_seconds (double pos_in_seconds)

Private Member Functions

Functions for state<->string conversions
void load_from_file (const string &filename, vector< string > &opts) const throw (ECA_ERROR&)
Functions for internal state changes
void select_active_buffering_mode (void)
void enable_active_buffering_mode (void)
void switch_to_direct_mode (void)
void switch_to_direct_mode_helper (vector< AUDIO_IO * > *objs, const vector< AUDIO_IO * > &directobjs)
void switch_to_db_mode (void)
void switch_to_db_mode_helper (vector< AUDIO_IO * > *objs, const vector< AUDIO_IO * > &directobjs)
void lock_all_memory (void)
void unlock_all_memory (void)
void set_defaults (void)
int number_of_realtime_inputs (void) const
int number_of_realtime_outputs (void) const
int number_of_non_realtime_inputs (void) const
int number_of_non_realtime_outputs (void) const
int number_of_chain_operators (void) const
void toggle_locked_state (bool value)
long int check_for_locked_buffersize (void) const
Private helper functions
const ECA_CHAINSETUP_BUFPARAMSactive_buffering_parameters (void) const
const ECA_CHAINSETUP_BUFPARAMSoverride_buffering_parameters (void) const
vector< string > get_attached_chains_to_input (AUDIO_IO *aiod) const
vector< string > get_attached_chains_to_output (AUDIO_IO *aiod) const
int number_of_attached_chains_to_input (AUDIO_IO *aiod) const
int number_of_attached_chains_to_output (AUDIO_IO *aiod) const
void add_chain_helper (const string &name)
void enable_audio_object_helper (AUDIO_IO *aobj) const
void calculate_processing_length (void)

Static Private Member Functions

Static private helper functions
static bool ok_audio_object_helper (const AUDIO_IO *aobj, const vector< AUDIO_IO * > &aobjs)
static void check_object_samplerate (const AUDIO_IO *obj, SAMPLE_SPECS::sample_rate_t srate) throw (ECA_ERROR&)
static string set_resource_helper (const ECA_RESOURCES &ecaresources, const string &tag, const string &alternative)
static void audio_object_open_info (const AUDIO_IO *aio)

Private Attributes

Configuration data (settings and values)
bool precise_sample_rates_rep
bool ignore_xruns_rep
bool rtcaps_rep
int output_openmode_rep
long int double_buffer_size_rep
string default_midi_device_rep
Current setup data (internal state, objects)
bool is_locked_rep
bool is_enabled_rep
bool multitrack_mode_rep
bool multitrack_mode_override_rep
bool memory_locked_rep
bool midi_server_needed_rep
int selected_chain_index_rep
int selected_cop_index_rep
int selected_cop_param_index_rep
int selected_ctrl_index_rep
int selected_ctrl_param_index_rep
int db_clients_rep
long int multitrack_mode_offset_rep
string setup_name_rep
string setup_filename_rep
vector< string > selected_chainids
map< string, LOOP_DEVICE * > loop_map
vector< double > input_start_pos
vector< double > output_start_pos
Buffering_mode_t buffering_mode_rep
Buffering_mode_t active_buffering_mode_rep
Mix_mode_t mix_mode_rep
vector< AUDIO_IO * > inputs
vector< AUDIO_IO * > inputs_direct_rep
vector< AUDIO_IO * > outputs
vector< AUDIO_IO * > outputs_direct_rep
vector< AUDIO_IO_MANAGER * > aio_managers_rep
map< string, string > aio_manager_option_map_rep
vector< CHAIN * > chains
vector< MIDI_IO * > midi_devices



Public type definitions and constants

enum  Buffering_mode {
  cs_bmode_auto, cs_bmode_nonrt, cs_bmode_rt, cs_bmode_rtlowlatency,
enum  Mix_mode { cs_mmode_avg, cs_mmode_sum }
enum  Audio_dir { cs_dir_input, cs_dir_output }
typedef enum Buffering_mode Buffering_mode_t
typedef enum Mix_mode Mix_mode_t
static const string default_audio_format_const = "s16_le,2,44100,i"
static const string default_bmode_nonrt_const = "1024,false,50,false,100000,true"
static const string default_bmode_rt_const = "1024,true,50,true,100000,true"
static const string default_bmode_rtlowlatency_const = "256,true,50,true,100000,false"

Functions for handling audio objects

void add_input (AUDIO_IO *aiod)
void add_output (AUDIO_IO *aiod, bool truncate)
void add_default_output (void)
void remove_audio_input (const string &label)
void remove_audio_output (const string &label)
void attach_input_to_selected_chains (const AUDIO_IO *obj)
void attach_output_to_selected_chains (const AUDIO_IO *obj)
bool ok_audio_object (const AUDIO_IO *aobj) const
bool is_realtime_target_output (int output_id) const
vector< string > audio_input_names (void) const
vector< string > audio_output_names (void) const
AUDIO_IO_MANAGERget_audio_object_manager (AUDIO_IO *aio) const
AUDIO_IO_MANAGERget_audio_object_type_manager (AUDIO_IO *aio) const
void register_engine_driver (AUDIO_IO_MANAGER *amgr)
void register_audio_object_to_manager (AUDIO_IO *aio)
void unregister_audio_object_from_manager (AUDIO_IO *aio)
void propagate_audio_io_manager_options (void)
AUDIO_IOadd_audio_object_helper (AUDIO_IO *aio)
void remove_audio_object_proxy (AUDIO_IO *aio)
void remove_audio_object_loop (const string &label, AUDIO_IO *aio, int dir)
void remove_audio_object_impl (const string &label, int dir, bool destroy)

Detailed Description

Class representing an ecasound chainsetup object.

Chainsetup is the central data object. It contains audio inputs, outputs, chains, operators and also information about how they are connected.

Notes: ECA_CHAINSETUP is closely coupled to the ECA_CHAINSETUP_PARSER and ECA_ENGINE. In addition, to ease implementation, also ECA_CONTROL classes have direct access to ECA_CHAINSETUP's implementation.

Kai Vehmanen

Definition at line 72 of file eca-chainsetup.h.

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

Generated by  Doxygen 1.6.0   Back to index