Sonic Flow libsf Reference Guide SF_Output_Terminal ();
Construct a "null" output terminal. The intention is that every output terminal is initialized after construction with the init_terminal () function. This is because in C++ an array of objects cannot be initialized sufficiently flexibly. virtual ~SF_Output_Terminal ();
Destruct an output terminal.
void init_terminal (const char* name,
const SF_Block* host,
SF_Frequency sample_rate = SF_DEFAULT_SAMPLE_RATE,
double relative_sample_rate = SF_DEFAULT_RELATIVE_SAMPLE_RATE);
Initialize the output terminal after construction. This function call is to be considered an "extension" to the default constructor of output terminals, since it MUST be called after constructing an output terminal.
virtual void set_sample_rate (SF_Frequency sample_rate);
Set the sample rate (in hertz) of the data going out from the output terminal. This will both initialize the sample rate and also reallocate the frame located at the terminal.
SF_Input_Terminal* get_first_destination_terminal ();
Fetch the first destination terminal from the list of connections and prepare to traverse the list. If there are no connections to this terminal, returns 0.
SF_Input_Terminal* get_next_destination_terminal ();
Fetch the next destination terminal from the list of connections. If there are no more connections, returns 0.
void connect (SF_Input_Terminal& destination);
Make a wire (connection) between an output terminal and an input terminal.
The direction of the wire is from this output terminal to the specified
destination input terminal. The connection function is supposed to be called by
the user. Connections can be made also with the `>>' operator in flexible
ways; check SF_Output_Terminal::operator>> ()
as well as
SF_Block::operator>> ()
.
void disconnect (SF_Input_Terminal& destination);
Remove a wire (connection) between an output terminal and an input terminal. The disconnection function is supposed to be called by the user.
SF_Block& operator>> (SF_Input_Terminal& dest_terminal);
The `>>' operator duplicates the functionality of connect (), i.e. you can write something like
sine.output[Y] >> adder >> fileout.input[X];
and have a connection between the blocks. In our example the blocks would be connected in cascade.
SF_Block& operator>> (SF_Block& dest_block);
Connect this terminal to the only input of the specified block.
inline SF_Frame* get_frame () const;
Return a pointer to the frame held in the output terminal.
Last modified: Thu Dec 10 14:21:42 1998
jarno.seppanen@cs.tut.fi
Audio Research Group