linuxsampler 2.3.1
|
Abstract interface class for InstrumentManagers. More...
#include <InstrumentManager.h>
Classes | |
struct | instrument_id_t |
Reflects unique ID of an instrument. More... | |
struct | instrument_info_t |
Rather abstract informations about an instrument. More... | |
Public Types | |
enum | mode_t { ON_DEMAND = 0 , ON_DEMAND_HOLD = 1 , PERSISTENT = 2 } |
Defines life-time of an instrument. More... | |
Public Member Functions | |
virtual std::vector< instrument_id_t > | Instruments ()=0 |
Returns all managed instruments. | |
virtual mode_t | GetMode (const instrument_id_t &ID)=0 |
Returns the current life-time strategy for the given instrument. | |
virtual void | SetMode (const instrument_id_t &ID, mode_t Mode)=0 |
Change the current life-time strategy for the given instrument. | |
void | SetModeInBackground (const instrument_id_t &ID, mode_t Mode) |
Same as SetMode(), but with the difference that this method won't block. | |
virtual String | GetInstrumentName (instrument_id_t ID)=0 |
Returns the name of the given instrument as reflected by its file. | |
virtual String | GetInstrumentDataStructureName (instrument_id_t ID)=0 |
Returns a textual identifier of the data structure for the given loaded instrument, which usually reflects the name of of the library used to load the instrument (i.e. | |
virtual String | GetInstrumentDataStructureVersion (instrument_id_t ID)=0 |
Returns the version of the data structure for the given loaded instrument, which usually reflects the version of the library which was used to load the instrument (i.e. | |
virtual InstrumentEditor * | LaunchInstrumentEditor (EngineChannel *pEngineChannel, instrument_id_t ID, void *pUserData=NULL) throw (InstrumentManagerException) =0 |
Spawn an appropriate editor for the given instrument that is actually capable to handle the instrument's format and data structure. | |
virtual std::vector< instrument_id_t > | GetInstrumentFileContent (String File) throw (InstrumentManagerException) =0 |
Returns a list of instrument IDs of the provided instrument file in case the provided file's format is supported. | |
virtual instrument_info_t | GetInstrumentInfo (instrument_id_t ID) throw (InstrumentManagerException) =0 |
Get detailed informations about the provided instrument file. | |
Static Public Member Functions | |
static void | LoadInstrumentInBackground (instrument_id_t ID, EngineChannel *pEngineChannel) |
Same as loading the given instrument directly on the given EngineChannel, but this method will not block, instead it will load the instrument in a separate thread. | |
static void | StopBackgroundThread () |
Stops the background thread that has been started by LoadInstrumentInBackground. | |
Abstract interface class for InstrumentManagers.
Sampler engines should provide an InstrumentManager for allowing detailed information retrieval and setting of its managed instruments through this general API.
Definition at line 52 of file InstrumentManager.h.
Defines life-time of an instrument.
Definition at line 57 of file InstrumentManager.h.
|
pure virtual |
Returns a textual identifier of the data structure for the given loaded instrument, which usually reflects the name of of the library used to load the instrument (i.e.
"libgig").
This method has to be implemented by the descendant.
|
pure virtual |
Returns the version of the data structure for the given loaded instrument, which usually reflects the version of the library which was used to load the instrument (i.e.
"3.1.0").
This method has to be implemented by the descendant.
|
pure virtual |
Returns a list of instrument IDs of the provided instrument file in case the provided file's format is supported.
InstrumentManagerException | if the format of the provided instrument file is not supported |
|
pure virtual |
Get detailed informations about the provided instrument file.
InstrumentManagerException | if the format of the provided instrument file is not supported |
|
pure virtual |
Returns the name of the given instrument as reflected by its file.
This method has to be implemented by the descendant.
|
pure virtual |
Returns the current life-time strategy for the given instrument.
This method has to be implemented by the descendant.
|
pure virtual |
Returns all managed instruments.
This method has to be implemented by the descendant.
|
pure virtual |
Spawn an appropriate editor for the given instrument that is actually capable to handle the instrument's format and data structure.
The instrument editor will be hosted in the sampler's own process to allow immediate live-editing of the instrument while playing the instrument in parallel by the sampler.
For this to work, instrument editor applications have to implement the abstract interface class InstrumentEditor
and have to generate a plugin DLL that has to be placed into the appropriate plugin directory of the sampler.
This method has to be implemented by the descendant.
pEngineChannel | - engine channel for which an instrument editor shall be launched for |
ID | - the instrument for which an editor should be spawned for |
pUserData | - (optional) arbitrary 3rd party user data that will blindly be passed to InstrumentEditor::Main() |
InstrumentManagerException | - in case no compatible instrument editor is registered to the sampler |
|
static |
Same as loading the given instrument directly on the given EngineChannel, but this method will not block, instead it will load the instrument in a separate thread.
ID | - the instrument to be loaded |
pEngineChannel | - on which engine channel the instrument should be loaded |
|
pure virtual |
Change the current life-time strategy for the given instrument.
This method has to be implemented by the descendant.
void LinuxSampler::InstrumentManager::SetModeInBackground | ( | const instrument_id_t & | ID, |
mode_t | Mode | ||
) |
Same as SetMode(), but with the difference that this method won't block.
Stops the background thread that has been started by LoadInstrumentInBackground.