Enable Lv2 Atom ports
All Atom ports are now being created and connected. Currently only MIDI input ports are supplied with data. Major contribution to #562 ("lv2 support").
This commit is contained in:
committed by
Johannes Lorenz
parent
acd0e4d430
commit
8b2902c27a
@@ -74,6 +74,7 @@ bool Lv2Effect::processAudioBuffer(sampleFrame *buf, const fpp_t frames)
|
||||
m_controls.run(frames);
|
||||
// m_pluginMutex.unlock();
|
||||
|
||||
m_controls.copyModelsToLmms();
|
||||
m_controls.copyBuffersToLmms(m_tmpOutputSmps.data(), frames);
|
||||
|
||||
double outSum = .0;
|
||||
|
||||
@@ -131,11 +131,9 @@ void Lv2Instrument::loadFile(const QString &file)
|
||||
bool Lv2Instrument::handleMidiEvent(
|
||||
const MidiEvent &event, const MidiTime &time, f_cnt_t offset)
|
||||
{
|
||||
// this function can be called from GUI threads while the plugin is running,
|
||||
// so this requires caching, e.g. in ringbuffers
|
||||
(void)time;
|
||||
(void)offset;
|
||||
(void)event;
|
||||
// this function can be called from GUI threads while the plugin is running
|
||||
// handleMidiInputEvent will use a thread-safe ringbuffer
|
||||
handleMidiInputEvent(event, time, offset);
|
||||
return true;
|
||||
}
|
||||
#endif
|
||||
@@ -161,6 +159,7 @@ void Lv2Instrument::play(sampleFrame *buf)
|
||||
|
||||
run(fpp);
|
||||
|
||||
copyModelsToLmms();
|
||||
copyBuffersToLmms(buf, fpp);
|
||||
|
||||
instrumentTrack()->processAudioBuffer(buf, fpp, nullptr);
|
||||
|
||||
@@ -63,7 +63,7 @@ public:
|
||||
/*
|
||||
realtime funcs
|
||||
*/
|
||||
bool hasNoteInput() const override { return false; /* not supported yet */ }
|
||||
bool hasNoteInput() const override { return Lv2ControlBase::hasNoteInput(); }
|
||||
#ifdef LV2_INSTRUMENT_USE_MIDI
|
||||
bool handleMidiEvent(const MidiEvent &event,
|
||||
const MidiTime &time = MidiTime(), f_cnt_t offset = 0) override;
|
||||
|
||||
Reference in New Issue
Block a user