24#ifndef __LS_INSTRUMENTMANAGER_H__
25#define __LS_INSTRUMENTMANAGER_H__
27#include "../common/global.h"
28#include "../common/Exception.h"
36 class InstrumentEditor;
Channel Interface for LinuxSampler Sampler Engines.
Exception that will be thrown in NON REAL TIME PARTS of the LinuxSampler application.
Instrument Editor Interface (external plugin)
Will be thrown by InstrumentManager implementations on errors.
InstrumentManagerException(String msg)
Abstract interface class for InstrumentManagers.
virtual String GetInstrumentDataStructureName(instrument_id_t ID)=0
Returns a textual identifier of the data structure for the given loaded instrument,...
virtual InstrumentEditor * LaunchInstrumentEditor(EngineChannel *pEngineChannel, instrument_id_t ID, void *pUserData=NULL)=0
Spawn an appropriate editor for the given instrument that is actually capable to handle the instrumen...
virtual void SetMode(const instrument_id_t &ID, mode_t Mode)=0
Change the current life-time strategy for the given instrument.
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 bl...
static void StopBackgroundThread()
Stops the background thread that has been started by LoadInstrumentInBackground.
mode_t
Defines life-time of an instrument.
@ ON_DEMAND_HOLD
Instrument will be loaded when needed and kept even if not needed anymore.
@ ON_DEMAND
Instrument will be loaded when needed, freed once not needed anymore.
@ PERSISTENT
Instrument will immediately be loaded and kept all the time.
virtual String GetInstrumentDataStructureVersion(instrument_id_t ID)=0
Returns the version of the data structure for the given loaded instrument, which usually reflects the...
virtual mode_t GetMode(const instrument_id_t &ID)=0
Returns the current life-time strategy for the given instrument.
virtual instrument_info_t GetInstrumentInfo(instrument_id_t ID)=0
Get detailed informations about the provided instrument file.
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 std::vector< instrument_id_t > Instruments()=0
Returns all managed instruments.
virtual std::vector< instrument_id_t > GetInstrumentFileContent(String File)=0
Returns a list of instrument IDs of the provided instrument file in case the provided file's format i...
Wraps as a kind of pointer class some data object shared with other threads, to protect / synchronize...
Reflects unique ID of an instrument.
bool operator==(const instrument_id_t &o) const
bool operator<(const instrument_id_t &o) const
uint Index
Index of the instrument within the file.
String FileName
File name of the instrument.
Rather abstract informations about an instrument.
uint8_t KeySwitchBindings[128]