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

dssiplugin.hpp File Reference

#include <unistd.h>
#include <cstring>
#include <string>
#include <map>
#include <vector>
#include <dssi.h>

Go to the source code of this file.

Classes

struct  DSSIPortList
 An object of this class should be passed as the last parameter to the register_dssi() function to specify the number and types of ports for your DSSI plugin. More...
class  DSSIPlugin
 This is a base class for DSSI plugins. More...

Enumerations

enum  DSSIFeatureMask { DSSI_NO_FEATURES = 0, DSSI_RECEIVES_MIDI = 1 << 0, DSSI_HAS_PROGRAMS = 1 << 1, DSSI_USES_SHM = 1 << 2 }
 This type enumerates the different features that can be enabled or disabled in a DSSI plugin. More...

Functions

DSSIFeatureMask operator| (const DSSIFeatureMask &m1, const DSSIFeatureMask &m2)
 OR operator for DSSIFeatureMask objects.
template<class T>
size_t register_dssi (const std::string &label, LADSPA_Properties properties, const std::string &name, const std::string &maker, const std::string &copyright, const DSSIPortList &ports, DSSIFeatureMask features=DSSI_RECEIVES_MIDI|DSSI_HAS_PROGRAMS|DSSI_USES_SHM)
 This is the function you should use to register your DSSI plugin class.


Detailed Description


Enumeration Type Documentation

enum DSSIFeatureMask
 

This type enumerates the different features that can be enabled or disabled in a DSSI plugin.

It is used as one of the argument to register_dssi(). You can use the logical OR operator to combine several features.

Enumerator:
DSSI_NO_FEATURES  No features enabled.
DSSI_RECEIVES_MIDI  A plugin that has this flag set will have a run_synth() callback and a get_midi_controller_for_port() callback.
DSSI_HAS_PROGRAMS  A plugin that has this flag set will have a get_program() callback and a select_program() callback.
DSSI_USES_SHM  This flag turns on the automatic SHM handling for the plugin.

When it is set, the function shm_attached() will be called when a new shared memory segment has been attached and the function shm_detach_request() will be called when a segment is no longer used by the UI.


Function Documentation

DSSIFeatureMask operator| const DSSIFeatureMask m1,
const DSSIFeatureMask m2
[inline]
 

OR operator for DSSIFeatureMask objects.

template<class T>
size_t register_dssi const std::string &  label,
LADSPA_Properties  properties,
const std::string &  name,
const std::string &  maker,
const std::string &  copyright,
const DSSIPortList ports,
DSSIFeatureMask  features = DSSI_RECEIVES_MIDI|DSSI_HAS_PROGRAMS|DSSI_USES_SHM
 

This is the function you should use to register your DSSI plugin class.

It should be called when the library is loaded, so you can write an initialisation function with the constructor attribute and put it there. Since this is a template function but the template type isn't one of the parameters, you need to give it explicitly like this:

    register_dssi<MyPluginClass>("my_plugin", 0, "My Plugin", "Me", "GPL", my_ports);

Parameters:
label The LADSPA label for this plugin
properties The LADSPA properties for this plugin
name The LADSPA name for this plugin
maker Your name!
copyright The copyright for this plugin (for example "GPL")
ports The port list for this DSSI plugin.
features The enabled features for this plugin.


Generated on Wed Mar 1 17:12:44 2006 for DSSI support libraries by  doxygen 1.4.4