1 |
/* |
/* |
2 |
* Copyright (C) 2007 Andreas Persson |
* Copyright (C) 2007 - 2017 Andreas Persson |
3 |
* |
* |
4 |
* This program is free software; you can redistribute it and/or |
* This program is free software; you can redistribute it and/or |
5 |
* modify it under the terms of the GNU General Public License as |
* modify it under the terms of the GNU General Public License as |
20 |
#ifndef GIGEDIT_LINUXSAMPLER_PLUGIN_H |
#ifndef GIGEDIT_LINUXSAMPLER_PLUGIN_H |
21 |
#define GIGEDIT_LINUXSAMPLER_PLUGIN_H |
#define GIGEDIT_LINUXSAMPLER_PLUGIN_H |
22 |
|
|
23 |
#include <config.h> |
#ifdef HAVE_CONFIG_H |
24 |
|
# include <config.h> |
25 |
#include <linuxsampler/plugins/InstrumentEditor.h> |
#endif |
26 |
|
|
27 |
#include <gig.h> |
#ifdef LIBLINUXSAMPLER_HEADER_FILE |
28 |
|
# include LIBLINUXSAMPLER_HEADER_FILE(plugins/InstrumentEditor.h) |
29 |
|
#else |
30 |
|
# include <linuxsampler/plugins/InstrumentEditor.h> |
31 |
|
#endif |
32 |
|
|
33 |
|
#ifdef LIBGIG_HEADER_FILE |
34 |
|
# include LIBGIG_HEADER_FILE(gig.h) |
35 |
|
#else |
36 |
|
# include <gig.h> |
37 |
|
#endif |
38 |
|
|
39 |
class LinuxSamplerPlugin : public LinuxSampler::InstrumentEditor { |
class LinuxSamplerPlugin : public LinuxSampler::InstrumentEditor { |
40 |
public: |
public: |
41 |
LinuxSamplerPlugin(); |
LinuxSamplerPlugin(); |
42 |
virtual int Main(void* pInstrument, String sTypeName, String sTypeVersion); |
virtual int Main(void* pInstrument, String sTypeName, String sTypeVersion); // old LS plugin API entry point |
43 |
|
virtual int Main(void* pInstrument, String sTypeName, String sTypeVersion, void* pUserData); // new LS plugin API entry point |
44 |
virtual bool IsTypeSupported(String sTypeName, String sTypeVersion); |
virtual bool IsTypeSupported(String sTypeName, String sTypeVersion); |
45 |
virtual String Name(); |
virtual String Name(); |
46 |
virtual String Version(); |
virtual String Version(); |
47 |
virtual String Description(); |
virtual String Description(); |
48 |
|
virtual ~LinuxSamplerPlugin(); |
49 |
|
|
50 |
private: |
private: |
51 |
|
void* pApp; |
52 |
|
class LSPluginPrivate* priv; |
53 |
|
|
54 |
void __onSamplesToBeRemoved(std::list<gig::Sample*> lSamples); |
void __onSamplesToBeRemoved(std::list<gig::Sample*> lSamples); |
55 |
|
void __onVirtualKeyboardKeyHit(int Key, int Velocity); |
56 |
|
void __onVirtualKeyboardKeyReleased(int Key, int Velocity); |
57 |
|
void __requestSamplerToSwitchInstrument(gig::Instrument* pInstrument); |
58 |
|
bool __onPollPeriod(); |
59 |
|
void __onDimRegionToBeChanged(gig::DimensionRegion* pDimRgn); |
60 |
|
void __onDimRegionChanged(gig::DimensionRegion* pDimRgn); |
61 |
|
void __onDimRegionChangedDebounced(); |
62 |
}; |
}; |
63 |
|
|
64 |
#endif // GIGEDIT_LINUXSAMPLER_PLUGIN_H |
#endif // GIGEDIT_LINUXSAMPLER_PLUGIN_H |