Skip to content

Commit fb0758a

Browse files
author
Timo Kaluza
committed
fixing issue free-audio#330, reset is not being called when vst3 stops processing
1 parent a9c9a63 commit fb0758a

File tree

3 files changed

+11
-0
lines changed

3 files changed

+11
-0
lines changed

src/clap_proxy.cpp

+6
Original file line numberDiff line numberDiff line change
@@ -338,6 +338,12 @@ void Plugin::stop_processing()
338338
_plugin->stop_processing(_plugin);
339339
}
340340

341+
void Plugin::reset()
342+
{
343+
auto thisFn = AlwaysAudioThread();
344+
_plugin->reset(_plugin);
345+
}
346+
341347
//void Plugin::process(const clap_process_t* data)
342348
//{
343349
// auto thisFn = AlwaysAudioThread();

src/clap_proxy.h

+1
Original file line numberDiff line numberDiff line change
@@ -178,6 +178,7 @@ class Plugin
178178
void deactivate() const;
179179
bool start_processing();
180180
void stop_processing();
181+
void reset();
181182
// void process(const clap_process_t* data);
182183
const clap_plugin_gui_t* getUI() const;
183184

src/wrapasvst3.cpp

+4
Original file line numberDiff line numberDiff line change
@@ -309,6 +309,10 @@ tresult PLUGIN_API ClapAsVst3::setProcessing(TBool state)
309309
{
310310
_processing = false;
311311
_plugin->stop_processing();
312+
313+
// VST3 has no specific reset - but it should happen when setprocessing is being called
314+
// https://steinbergmedia.github.io/vst3_dev_portal/pages/Technical+Documentation/Workflow+Diagrams/Audio+Processor+Call+Sequence.html
315+
_plugin->reset();
312316
}
313317
}
314318
return result;

0 commit comments

Comments
 (0)