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

ECA_CHAINSETUP Class Reference

#include <eca-chainsetup.h>

Inheritance diagram for ECA_CHAINSETUP:

ECA_CHAINSETUP_POSITION ECA_AUDIO_POSITION ECA_SAMPLERATE_AWARE

List of all members.


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.

Author:
Kai Vehmanen

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


Public type definitions and constants



enum  Buffering_mode {
  cs_bmode_auto, cs_bmode_nonrt, cs_bmode_rt, cs_bmode_rtlowlatency,
  cs_bmode_none
}
typedef enum Buffering_mode Buffering_mode_t
enum  Mix_mode { cs_mmode_avg, cs_mmode_sum }
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,true,50,true,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_default_output (void)
void add_input (AUDIO_IO *aiod)
void add_output (AUDIO_IO *aiod, bool truncate)
void attach_input_to_selected_chains (const AUDIO_IO *obj)
void attach_output_to_selected_chains (const AUDIO_IO *obj)
vector< string > audio_input_names (void) const
vector< string > audio_output_names (void) const
bool is_realtime_target_output (int output_id) const
bool ok_audio_object (const AUDIO_IO *aobj) const
void remove_audio_input (const string &label)
void remove_audio_output (const string &label)
static void audio_object_info (const AUDIO_IO *aio)

Public Member Functions

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 handling chains


void add_default_chain (void)
void add_new_chains (const vector< string > &newchains)
vector< string > chain_names (void) const
void clear_chains (void)
unsigned int first_selected_chain (void) const
vector< string > get_attached_chains_to_iodev (const string &filename) const
const CHAINget_chain_with_name (const string &name) const
void remove_chains (void)
void rename_chain (const string &name)
void select_all_chains (void)
void select_chains (const vector< string > &chainsarg)
const vector< string > & selected_chains (void) const
void toggle_chain_bypass (void)
void toggle_chain_muting (void)
Functions for handling MIDI-objects


void add_default_midi_device (void)
void add_midi_device (MIDI_IO *mididev)
void remove_midi_device (const string &name)
Functions for configuration (default values, settings)


Buffering_mode_t buffering_mode (void) const
const ECA_AUDIO_FORMATdefault_audio_format (void) const
const string & default_midi_device (void) const
bool ignore_xruns (void) const
bool is_valid_for_connection (bool verbose) const
Mix_mode_t mix_mode (void) const
bool multitrack_mode (void) const
long int multitrack_mode_offset (void) const
int output_openmode (void) const
bool precise_sample_rates (void) const
void set_audio_io_manager_option (const string &mgrname, const string &optionstr)
void set_buffering_mode (Buffering_mode_t value)
void set_default_audio_format (ECA_AUDIO_FORMAT &value)
void set_default_midi_device (const string &name)
void set_mix_mode (Mix_mode_t value)
void set_output_openmode (int value)
void toggle_ignore_xruns (bool v)
void toggle_precise_sample_rates (bool value)
Functions for overriding current buffering mode parameters


long int buffersize (void) const
long int double_buffer_size (void) const
bool double_buffering (void) const
int get_sched_priority (void) const
bool max_buffers (void) const
bool raised_priority (void) const
void set_buffersize (long int value)
void set_double_buffer_size (long int v)
void set_sched_priority (int value)
void toggle_double_buffering (bool value)
void toggle_max_buffers (bool v)
void toggle_raised_priority (bool value)
Functions that modify current state


void disable (void)
void enable (void) throw (ECA_ERROR&)
const string & filename (void) const
const string & name (void) const
void set_filename (const string &str)
void set_name (const string &str)
Functions for init and cleanup


 ECA_CHAINSETUP (const string &setup_file)
 ECA_CHAINSETUP (const vector< string > &options)
 ECA_CHAINSETUP (void)
virtual ~ECA_CHAINSETUP (void)
Functions for observing current state


bool has_nonrealtime_objects (void) const
bool has_realtime_objects (void) const
bool is_enabled (void) const
bool is_locked (void) const
bool is_valid (void) const
string options_to_string (void) const
Functions for string->state conversions


void interpret_global_option (const string &arg)
void interpret_object_option (const string &arg)
void interpret_option (const string &arg)
void interpret_options (vector< string > &opts)
bool interpret_result (void) const
const string & interpret_result_verbose (void) const
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.

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
void set_max_length_in_samples (SAMPLE_SPECS::sample_pos_t pos)
void set_max_length_in_seconds (double pos_in_seconds)
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 utility functions


bool out_position (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 getting audio format information


SAMPLE_SPECS::sample_rate_t samples_per_second (void) const
Functions for string<->state conversions


void save (void) throw (ECA_ERROR&)
void save_to_file (const string &filename) throw (ECA_ERROR&)
Public functions for setting position (with action)


void seek_first (void)
void seek_last (void)
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)
Functions implemented from ECA_AUDIO_POSITION


virtual void seek_position (void)
Functions implemented from ECA_SAMPLERATE_AWARE


virtual void set_samples_per_second (SAMPLE_SPECS::sample_rate_t v)

Protected Member Functions

Protected functions for setting position (without action)


void change_position_in_samples (SAMPLE_SPECS::sample_pos_t pos)
void change_position_in_seconds (double pos_in_seconds)
void set_position_in_samples (SAMPLE_SPECS::sample_pos_t pos)
void set_position_in_seconds (double pos_in_seconds)
void set_position_in_seconds (int pos_in_seconds)
Protected functions for setting length


void extend_position (void)
void set_length_in_samples (SAMPLE_SPECS::sample_pos_t pos)
void set_length_in_seconds (double pos_in_seconds)
void set_length_in_seconds (int pos_in_seconds)
Protected functions for controlling looping


bool looping_enabled (void) const
void toggle_looping (bool v)

Private Member Functions

Private helper functions


const ECA_CHAINSETUP_BUFPARAMS & active_buffering_parameters (void) const
void add_chain_helper (const string &name)
void calculate_processing_length (void)
void enable_audio_object_helper (AUDIO_IO *aobj) 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
const ECA_CHAINSETUP_BUFPARAMS & override_buffering_parameters (void) const
Functions for handling audio objects


AUDIO_IOadd_audio_object_helper (AUDIO_IO *aio)
AUDIO_IO_MANAGERget_audio_object_manager (AUDIO_IO *aio) const
AUDIO_IO_MANAGERget_audio_object_type_manager (AUDIO_IO *aio) const
void propagate_audio_io_manager_options (void)
void register_audio_object_to_manager (AUDIO_IO *aio)
void register_engine_driver (AUDIO_IO_MANAGER *amgr)
void remove_audio_object_helper (AUDIO_IO *aio)
void unregister_audio_object_from_manager (AUDIO_IO *aio)
Functions for internal state changes


long int check_for_locked_buffersize (void) const
void enable_active_buffering_mode (void)
void lock_all_memory (void)
int number_of_chain_operators (void) const
int number_of_non_realtime_inputs (void) const
int number_of_non_realtime_outputs (void) const
int number_of_realtime_inputs (void) const
int number_of_realtime_outputs (void) const
void select_active_buffering_mode (void)
void set_defaults (void)
void switch_to_db_mode (void)
void switch_to_db_mode_helper (vector< AUDIO_IO * > *objs, const vector< AUDIO_IO * > &directobjs)
void switch_to_direct_mode (void)
void switch_to_direct_mode_helper (vector< AUDIO_IO * > *objs, const vector< AUDIO_IO * > &directobjs)
void toggle_locked_state (bool value)
void unlock_all_memory (void)
Functions for state<->string conversions


void load_from_file (const string &filename, vector< string > &opts) const throw (ECA_ERROR&)

Static Private Member Functions

Static private helper functions


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

Private Attributes

Current setup data (internal state, objects)


Buffering_mode_t active_buffering_mode_rep
int active_chain_index_rep
int active_chainop_index_rep
int active_chainop_param_index_rep
map< string, string > aio_manager_option_map_rep
vector< AUDIO_IO_MANAGER * > aio_managers_rep
std::list< AUDIO_IO * > aobj_garbage_rep
Buffering_mode_t buffering_mode_rep
vector< CHAIN * > chains
int db_clients_rep
ECA_ENGINE_DRIVERengine_driver_repp
vector< double > input_start_pos
vector< AUDIO_IO * > inputs
vector< AUDIO_IO * > inputs_direct_rep
bool is_enabled_rep
bool is_locked_rep
map< int, LOOP_DEVICE * > loop_map
bool memory_locked_rep
vector< MIDI_IO * > midi_devices
bool midi_server_needed_rep
MIDI_SERVERmidi_server_repp
Mix_mode_t mix_mode_rep
long int multitrack_mode_offset_rep
bool multitrack_mode_override_rep
bool multitrack_mode_rep
vector< double > output_start_pos
vector< AUDIO_IO * > outputs
vector< AUDIO_IO * > outputs_direct_rep
AUDIO_IO_DB_SERVERpserver_repp
vector< string > selected_chainids
string setup_filename_rep
string setup_name_rep
Configuration data (settings and values)


ECA_CHAINSETUP_PARSER cparser_rep
string default_midi_device_rep
long int double_buffer_size_rep
bool ignore_xruns_rep
ECA_CHAINSETUP_impl * impl_repp
int output_openmode_rep
bool precise_sample_rates_rep
bool rtcaps_rep

Friends

class ECA_CHAINSETUP_PARSER
class ECA_CONTROL
class ECA_CONTROL_BASE
class ECA_CONTROL_OBJECTS
class ECA_ENGINE

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

Generated by  Doxygen 1.6.0   Back to index