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

MPlugin Class Reference

A plugin module. More...

#include <MPlugin.h>

Inheritance diagram for MPlugin:

MPluginDescriptor MModule List of all members.

Public Slots

virtual void Activate ()
virtual void Deactivate ()
virtual void Run (const unsigned int n)
virtual void Cleanup ()
virtual void SetAutoRegister (bool value)

Public Member Functions

virtual ~MPlugin ()
virtual LADSPA_Handle LADSPAHandle ()
virtual MPluginAudioInputPortAudioInput (const unsigned int n) const
virtual MPluginAudioOutputPortAudioOutput (const unsigned int n) const
virtual MPluginControlInputPortControlInput (const unsigned int n) const
virtual MPluginControlOutputPortControlOutput (const unsigned int n) const
virtual MAudioInputPortModuleAudioInput (const unsigned int n) const
virtual MAudioOutputPortModuleAudioOutput (const unsigned int n) const
virtual MControlInputPortModuleControlInput (const unsigned int n) const
virtual MControlOutputPortModuleControlOutput (const unsigned int n) const
virtual unsigned int NumberOfAudioInputs () const
virtual unsigned int NumberOfAudioOutputs () const
virtual unsigned int NumberOfControlInputs () const
virtual unsigned int NumberOfControlOutputs () const
virtual bool IsAutoRegister () const

Static Public Member Functions

static MPluginCreateFromDescriptor (const MPluginDescriptor *pluginDescriptor, const string &instanceName="")
static MPluginCreateFromLibrary (const string &library, const string &label, const string &instanceName="")

Protected Member Functions

 MPlugin (const LADSPA_Descriptor *descriptor, LADSPA_Handle instance, const string &instanceName)
virtual void createAudioInput (const unsigned long portNumber)
virtual void createAudioOutput (const unsigned long portNumber)
virtual void createControlInput (const unsigned long portNumber)
virtual void createControlOutput (const unsigned long portNumber)

Protected Attributes

vector< MPluginAudioInputPort * > _audioInput
vector< MPluginAudioOutputPort * > _audioOutput
vector< MPluginControlInputPort * > _controlInput
vector< MPluginControlOutputPort * > _controlOutput
LADSPA_Handle _instance
bool _autoRegister

Detailed Description

This is a wrapper to a LADSPA plugin instance.

By default, plugins are run ( Run( const unsigned int n ) ) every JACK cycle by the MSupervisor. To unset this default behaviour, use the MSupervisor::UnregisterPlugin method.


Constructor & Destructor Documentation

MPlugin::~MPlugin  )  [virtual]
 

Destructor.

  • deactivates the plugin if it's active
  • cleans up the plugin

Member Function Documentation

MPlugin * MPlugin::CreateFromDescriptor const MPluginDescriptor pluginDescriptor,
const string &  instanceName = ""
[static]
 

Creates a new plugin module by instanciating pluginDescriptor.

Returns:
A pointer to a new plugin instance or NULL if the instanciation failed.

MPlugin * MPlugin::CreateFromLibrary const string &  library,
const string &  label,
const string &  instanceName = ""
[static]
 

Creates a new plugin module from the name of its library and its plugin name.

Returns:
A pointer to a new plugin instance or NULL if the creation failed.

MPluginAudioInputPort * MPlugin::AudioInput const unsigned int  n  )  const [virtual]
 

The nth audio input port ( MPluginAudioInputPort ) of the plugin.

Precondition:
n < NumberOfAudioInputs( )
Postcondition:
result != NULL

MPluginAudioOutputPort * MPlugin::AudioOutput const unsigned int  n  )  const [virtual]
 

The nth audio output port ( MPluginAudioOutputPort ) of the plugin.

Precondition:
n < NumberOfAudioOutputs( )
Postcondition:
result != NULL

MPluginControlInputPort * MPlugin::ControlInput const unsigned int  n  )  const [virtual]
 

The nth control input port ( MPluginControlInputPort ) of the plugin.

Precondition:
n < NumberOfControlInputs( )
Postcondition:
result != NULL

MPluginControlOutputPort * MPlugin::ControlOutput const unsigned int  n  )  const [virtual]
 

The nth control output port ( MPluginControlOutputPort ) of the plugin.

Precondition:
n < NumberOfControlOutputs( )
Postcondition:
result != NULL

MAudioInputPort * MPlugin::ModuleAudioInput const unsigned int  n  )  const [virtual]
 

The nth audio input port ( MAudioInputPort ) of the module.

Precondition:
n < NumberOfAudioInputs( )
Postcondition:
result != NULL

Implements MModule.

MAudioOutputPort * MPlugin::ModuleAudioOutput const unsigned int  n  )  const [virtual]
 

The nth audio output port ( MAudioOutputPort ) of the module.

Precondition:
n < NumberOfAudioOutputs( )
Postcondition:
result != NULL

Implements MModule.

MControlInputPort * MPlugin::ModuleControlInput const unsigned int  n  )  const [virtual]
 

The nth control input port ( MControlInputPort ) of the module.

Precondition:
n < NumberOfControlInputs( )
Postcondition:
result != NULL

Implements MModule.

MControlOutputPort * MPlugin::ModuleControlOutput const unsigned int  n  )  const [virtual]
 

The nth control output port ( MControlOutputPort ) of the module.

Precondition:
n < NumberOfControlOutputs( )
Postcondition:
result != NULL

Implements MModule.

unsigned int MPlugin::NumberOfAudioInputs  )  const [virtual]
 

The number of audio input ports ( MPluginAudioInputPort ) of the plugin.

Implements MModule.

unsigned int MPlugin::NumberOfAudioOutputs  )  const [virtual]
 

The number of audio output ports ( MPluginAudioOutputPort ) of the plugin.

Implements MModule.

unsigned int MPlugin::NumberOfControlInputs  )  const [virtual]
 

The number of control input ports ( MPluginControlInputPort ) of the plugin.

Implements MModule.

unsigned int MPlugin::NumberOfControlOutputs  )  const [virtual]
 

The number of control output ports ( MPluginControlOutputPort ) of the client.

Implements MModule.

bool MPlugin::IsAutoRegister  )  const [virtual]
 

Is the plugin automatically registered on activation ?

If this is true, when the plugin is activated it will automatically register with the supervisor and then will be run once every JACK cycle by the supervisor.

See also:
MSupervisor::RegisterPlugin( Plugin * plugin )

MSupervisor::UnregisterPlugin( Plugin * plugin )

SetAutoRegister( bool value )

_autoRegister

void MPlugin::Activate  )  [virtual, slot]
 

Try to activate the module.

At the end of the method, if the module has been activated IsActive( ) should return TRUE and if the module has not been activated IsActive( ) should return FALSE.

Precondition:
! IsActive( )

Implements MModule.

void MPlugin::Deactivate  )  [virtual, slot]
 

Try to deactivate the module.

At the end of the method, if the module has been deactivated IsActive( ) should return FALSE and if the module has not been deactivated IsActive( ) should return TRUE.

Precondition:
IsActive( )

Implements MModule.

void MPlugin::Run const unsigned int  n  )  [virtual, slot]
 

Run the module.

Ask the module to proceed a block of audio data.

Parameters:
n Indicates the size of the block.
Precondition:
IsActive( )
Postcondition:
IsActive( )

Implements MModule.

void MPlugin::Cleanup  )  [virtual, slot]
 

Cleans up the LADSPA instance.

Precondition:
! IsActive( )

void MPlugin::SetAutoRegister bool  value  )  [virtual, slot]
 

Set the automatic registration behaviour.

See also:
IsAutoRegister( )

void MPlugin::createAudioInput const unsigned long  portNumber  )  [protected, virtual]
 

Creates a new audio input port.

Creates a MPluginAudioInputPort corresponding to the portNumberth port of the plugin descriptor.

Reimplemented from MPluginDescriptor.

void MPlugin::createAudioOutput const unsigned long  portNumber  )  [protected, virtual]
 

Creates a new audio output port.

Creates a MPluginAudioOutputPort corresponding to the the portNumberth port of the plugin descriptor.

Reimplemented from MPluginDescriptor.

void MPlugin::createControlInput const unsigned long  portNumber  )  [protected, virtual]
 

Creates a new control input port.

Creates a new MPluginControlInputPort corresponding to the portNumberth port of the plugin descriptor.

Reimplemented from MPluginDescriptor.

void MPlugin::createControlOutput const unsigned long  portNumber  )  [protected, virtual]
 

Creates a new control output port.

Creates a new MPluginControlOutputPort corresponding to the portNumberth port of the plugi descriptor.

Reimplemented from MPluginDescriptor.


Member Data Documentation

vector< MPluginAudioInputPort * > MPlugin::_audioInput [protected]
 

The audio input ports.

vector< MPluginAudioOutputPort * > MPlugin::_audioOutput [protected]
 

The audio output ports.

vector< MPluginControlInputPort * > MPlugin::_controlInput [protected]
 

The control input ports.

vector< MPluginControlOutputPort * > MPlugin::_controlOutput [protected]
 

The control output ports.

LADSPA_Handle MPlugin::_instance [protected]
 

LADSPA Handle of the instance.

bool MPlugin::_autoRegister [protected]
 

Is the plugin automatically registered on activation ?


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