Main Page   Class Hierarchy   Compound List   File List   Compound Members   File Members   Examples  

JezabelPatchTool Class Reference

#include <jezabelpatchtool.h>

Inheritance diagram for JezabelPatchTool::

JezabelTool List of all members.

Public Methods

 JezabelPatchTool (int input_ports, int output_ports)
virtual void activate ()
virtual void run (int samples)
virtual void seek (JezabelPosition position)
virtual JezabelPosition length ()
virtual void deactivate ()
virtual int blockSize ()
virtual const char* strerror ()
virtual void setBuffer (int port, JezabelData *buffer)
void addChild (JezabelTool *child)
void connectChild (int nChild, int nPort, int nChan)

Detailed Description

A JezabelPatchTool is a tool that connects other tools. The connections can be modified dynamically.

The children of a patch are run in a fixed sequence. Their inputs and outputs can be assigned to channels. That is, an input port reads its assigned channel, while an output port writes its assigned channel. Thus, an input port is effectively connected to the most recent port to write that channel. Channels can be overwritten, and in particular the same channel can be assigned to both an input port and an output port of given child, in which case the effect is to modify the contents of the channel "in place".

The channels are numbered as follows. If the JezabelPathTool has N input ports and M output ports, then channels 0..N-1 are the input ports of the JezabelPatchTool, channels N..N+M-1 are its output ports, and higher numbered channels are available for internal connections.


Constructor & Destructor Documentation

JezabelPatchTool::JezabelPatchTool ( int input_ports,
int output_ports )
 

Constructor


Member Function Documentation

void JezabelPatchTool::activate ( ) [virtual]
 

Warns tool we are about to call "run"

Reimplemented from JezabelTool.

void JezabelPatchTool::addChild ( JezabelTool * child )
 

Add a child tool at the end of the sequence. The child tool becomes property of the patch, and will be deleted when the patch is deleted.

int JezabelPatchTool::blockSize ( ) [virtual]
 

Return the maximum number of samples that this tool can handle with a call to run(), or zero if there is no maximum.

Reimplemented from JezabelTool.

void JezabelPatchTool::connectChild ( int nChild,
int nPort,
int nChan )
 

Connect port nPort of child nChild to channel nChan. It is safe to call connectChild even while the tool is running.

void JezabelPatchTool::deactivate ( ) [virtual]
 

Indicate we are done calling run, and will not call run again until activate is called.

Reimplemented from JezabelTool.

JezabelPosition JezabelPatchTool::length ( ) [virtual]
 

Return the length of the stream for this tool. This only makes sense for some tools, and will return JezabelLengthMax if the is no upper bound on the length.

Reimplemented from JezabelTool.

void JezabelPatchTool::run ( int samples ) [virtual]
 

Run the tool on "samples" samples, which must be less than or equal to "max_request".

Reimplemented from JezabelTool.

void JezabelPatchTool::seek ( JezabelPosition position ) [virtual]
 

Seek to a given position. This only makes sense for some tools, and is ignored by others.

Reimplemented from JezabelTool.

void JezabelPatchTool::setBuffer ( int port,
JezabelData * buffer ) [virtual]
 

Assign buffer "buffer" to port "port*. Must be called for all ports before calling "activate"

Reimplemented from JezabelTool.

const char * JezabelPatchTool::strerror ( ) [virtual]
 

Returns string describing error in most recent operation, or null is no error

Reimplemented from JezabelTool.


The documentation for this class was generated from the following file:
Generated at Sun Jan 18 20:51:23 2004 for Jezabel by doxygen1.2.8.1 written by Dimitri van Heesch, © 1997-2001