36 |
} |
} |
37 |
|
|
38 |
LinuxSamplerPlugin::~LinuxSamplerPlugin() { |
LinuxSamplerPlugin::~LinuxSamplerPlugin() { |
39 |
if (pApp) delete (GigEdit*) pApp; |
if (pApp) delete static_cast<GigEdit*>(pApp); |
40 |
} |
} |
41 |
|
|
42 |
int LinuxSamplerPlugin::Main(void* pInstrument, String sTypeName, String sTypeVersion, void* /*pUserData*/) { |
int LinuxSamplerPlugin::Main(void* pInstrument, String sTypeName, String sTypeVersion, void* /*pUserData*/) { |
46 |
int LinuxSamplerPlugin::Main(void* pInstrument, String sTypeName, String sTypeVersion) { |
int LinuxSamplerPlugin::Main(void* pInstrument, String sTypeName, String sTypeVersion) { |
47 |
std::cout << "Entered Gigedit Main() loop :)\n" << std::flush; |
std::cout << "Entered Gigedit Main() loop :)\n" << std::flush; |
48 |
gig::Instrument* pGigInstr = static_cast<gig::Instrument*>(pInstrument); |
gig::Instrument* pGigInstr = static_cast<gig::Instrument*>(pInstrument); |
49 |
GigEdit* app = (GigEdit*) pApp; |
GigEdit* app = static_cast<GigEdit*>(pApp); |
50 |
|
|
51 |
// connect notification signals |
// connect notification signals |
52 |
app->signal_file_structure_to_be_changed().connect( |
app->signal_file_structure_to_be_changed().connect( |
142 |
|
|
143 |
bool LinuxSamplerPlugin::__onPollPeriod() { |
bool LinuxSamplerPlugin::__onPollPeriod() { |
144 |
#if HAVE_LINUXSAMPLER_VIRTUAL_MIDI_DEVICE |
#if HAVE_LINUXSAMPLER_VIRTUAL_MIDI_DEVICE |
145 |
GigEdit* app = (GigEdit*) pApp; |
GigEdit* app = static_cast<GigEdit*>(pApp); |
146 |
if (!NotesChanged()) return true; |
if (!NotesChanged()) return true; |
147 |
for (int iKey = 0; iKey < 128; iKey++) |
for (int iKey = 0; iKey < 128; iKey++) |
148 |
if (NoteChanged(iKey)) |
if (NoteChanged(iKey)) |
160 |
std::set<void*> samples; |
std::set<void*> samples; |
161 |
for ( |
for ( |
162 |
std::list<gig::Sample*>::iterator iter = lSamples.begin(); |
std::list<gig::Sample*>::iterator iter = lSamples.begin(); |
163 |
iter != lSamples.end(); iter++ |
iter != lSamples.end(); ++iter |
164 |
) samples.insert((void*)*iter); |
) samples.insert((void*)*iter); |
165 |
// finally send notification to sampler |
// finally send notification to sampler |
166 |
NotifySamplesToBeRemoved(samples); |
NotifySamplesToBeRemoved(samples); |