Main Page | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Class Members

MSupervisor Class Reference

The supervisor client. More...

#include <MSupervisor.h>

Inheritance diagram for MSupervisor:

MClient MModule List of all members.

Public Member Functions

unsigned long SampleRate ()
unsigned int BufferSize ()
virtual void Run (const unsigned int n)

Static Public Member Functions

static MSupervisorSupervisor ()
static void NotifyClientCreation (MClient *client)
static void NotifyClientDestruction (MClient *client)
static void RegisterPlugin (MPlugin *plugin)
static void UnregisterPlugin (MPlugin *plugin)

Protected Member Functions

 MSupervisor (jack_client_t *jackClient)
void createPhysicalPorts ()
virtual void addExternalAudioInput (const string &fullName)
virtual void addExternalAudioOutput (const string &fullName)

Static Protected Member Functions

static void chooseAssignedClient ()

Static Protected Attributes

static vector< MPlugin * > _registeredPlugin
static MSupervisor_singleton = 0
static jack_client_t * _assignedClient = 0
static jack_client_t * _standaloneSupervisor = 0
static vector< MClient * > _existingClient

Detailed Description

This a kind of special client. It refers to a actual JACK client of the application but this client can be a standalone supervisor or an already existing client.

The supervisor is used for :

But we want to provide those facilities without the need to create a explicitly a specific client. The supervisor is thus using the reference of an existing JACK client in the application or, if no client have been created so far, a standalone supervisor will be created ( it will be automatically deleted when another client will be create ). But you don't need to know all that to use the supervisor's interface ... The actual JACK client that will be used to provide those supervisor facilities is called "assigned client".


Member Function Documentation

MSupervisor * MSupervisor::Supervisor  )  [static]
 

Gets the MSupervisor singleton instance.

void MSupervisor::NotifyClientCreation MClient client  )  [static]
 

Notifies the creation of a client.

This will be called automatically during the creation of a client. And will be used to keep track of the existing clients in the application and to designate the client assigned to provide the supervisor's facilities.

void MSupervisor::NotifyClientDestruction MClient client  )  [static]
 

Notifies the destruction of a client.

This will be called automatically during the creation of a client. And will be used to keep track of the existing clients in the application and to designate the client assigned to provide the supervisor's facilities.

unsigned long MSupervisor::SampleRate  ) 
 

The audio sample rate.

unsigned int MSupervisor::BufferSize  ) 
 

The buffer size to use for audio data.

void MSupervisor::Run const unsigned int  n  )  [virtual]
 

Runs all the plugins registered with the supervisor.

Reimplemented from MClient.

void MSupervisor::RegisterPlugin MPlugin plugin  )  [static]
 

Registers a plugin, a registered plugin will be run once and only once every JACK cycle.

This is the default behaviour.

Precondition:
plugin->IsActive( )
See also:
MPlugin::IsAutoRegister( )

MPlugin::SetAutoRegister( bool value )

void MSupervisor::UnregisterPlugin MPlugin plugin  )  [static]
 

Unregisters a plugin, the plugin will not be run anymore by the supervisor.

void MSupervisor::createPhysicalPorts  )  [protected]
 

Adds all the physical ports found by JACK to the MSupervisor.

void MSupervisor::addExternalAudioInput const string &  fullName  )  [protected, virtual]
 

Adds an existing external jack_port_t to the MSupervisor.

Creates a MExternalAudioInputPort corresponding to jackPort in to the MSupervisor.

Postcondition:
IsMine( newPort )

void MSupervisor::addExternalAudioOutput const string &  fullName  )  [protected, virtual]
 

Adds an existing external jack_port_t to the MSupervisor.

Creates a MExternalAudioOutputPort corresponding to jackPort in to the MSupervisor.

Postcondition:
IsMine( newPort )

Member Data Documentation

vector< MPlugin * > MSupervisor::_registeredPlugin [static, protected]
 

The plugins registered with the supervisor.

MSupervisor * MSupervisor::_singleton = 0 [static, protected]
 

The singleton instance.

jack_client_t * MSupervisor::_assignedClient = 0 [static, protected]
 

The actual JACK client that will be used to provide the supervisor's facilities.

jack_client_t * MSupervisor::_standaloneSupervisor = 0 [static, protected]
 

The reference to the standalone supervisor if any.

vector< MClient * > MSupervisor::_existingClient [static, protected]
 

The clients existing in the application.


The documentation for this class was generated from the following files:
Generated on Mon Jan 31 12:43:32 2005 for la Marmite by Doxygen 1.4.1