commit 0d144b13807d7a8bbbc432f078d613f6a5225c6a
parent 4950d1bcc6cd405563640e2d9b6c2000345fecc0
Author: Alexandre BIQUE <bique.alexandre@gmail.com>
Date: Tue, 31 Aug 2021 10:06:50 +0200
Fix assertions
Diffstat:
3 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/examples/host/engine.cc b/examples/host/engine.cc
@@ -137,7 +137,7 @@ int Engine::audioCallback(const void * input,
}
}
- thiz->pluginHost_->processInit(frameCount);
+ thiz->pluginHost_->processBegin(frameCount);
MidiSettings &ms = thiz->settings_.midiSettings();
diff --git a/examples/host/plugin-host.cc b/examples/host/plugin-host.cc
@@ -551,9 +551,7 @@ bool PluginHost::clapGuiResize(const clap_host *host, uint32_t width, uint32_t h
return true;
}
-void PluginHost::processInit(int nframes) {
- checkForAudioThread();
-
+void PluginHost::processBegin(int nframes) {
process_.frames_count = nframes;
process_.steady_time = engine_.steadyTime_;
}
@@ -1087,7 +1085,7 @@ void PluginHost::setPluginState(PluginState state) {
break;
case ActiveAndReadyToDeactivate:
- Q_ASSERT(state_ == ActiveAndSleeping || state_ == ActiveWithError);
+ Q_ASSERT(state_ == ActiveAndProcessing || state_ == ActiveAndSleeping || state_ == ActiveWithError);
break;
default:
diff --git a/examples/host/plugin-host.hh b/examples/host/plugin-host.hh
@@ -40,7 +40,7 @@ public:
void setPorts(int numInputs, float **inputs, int numOutputs, float **outputs);
void setParentWindow(WId parentWindow);
- void processInit(int nframes);
+ void processBegin(int nframes);
void processNoteOn(int sampleOffset, int channel, int key, int velocity);
void processNoteOff(int sampleOffset, int channel, int key, int velocity);
void processNoteAt(int sampleOffset, int channel, int key, int pressure);