Allow to special case plugins used for IR analysis
This is relevant for some VST specifics (e.g connected pins) or similar audioMasterCallbacks that use either global or plugin-insert specific data.
This commit is contained in:
parent
2ee2b8481c
commit
5d4fbcb1ea
@ -293,6 +293,8 @@ class LIBARDOUR_API Plugin : public PBD::StatefulDestructible, public HasLatency
|
||||
virtual void set_owner (SessionObject* o) { _owner = o; }
|
||||
SessionObject* owner() const { return _owner; }
|
||||
|
||||
void use_for_impulse_analysis () { _for_impulse_analysis = true; }
|
||||
|
||||
ARDOUR::AudioEngine& engine() const { return _engine; }
|
||||
ARDOUR::Session& session() const { return _session; }
|
||||
|
||||
@ -364,13 +366,14 @@ protected:
|
||||
/** Do the actual removal of a preset of the provided name */
|
||||
virtual void do_remove_preset (std::string) = 0;
|
||||
|
||||
ARDOUR::AudioEngine& _engine;
|
||||
ARDOUR::Session& _session;
|
||||
PluginInfoPtr _info;
|
||||
uint32_t _cycles;
|
||||
std::map<std::string, PresetRecord> _presets;
|
||||
ARDOUR::AudioEngine& _engine;
|
||||
ARDOUR::Session& _session;
|
||||
PluginInfoPtr _info;
|
||||
uint32_t _cycles;
|
||||
SessionObject* _owner;
|
||||
bool _for_impulse_analysis;
|
||||
|
||||
SessionObject* _owner;
|
||||
std::map<std::string, PresetRecord> _presets;
|
||||
|
||||
private:
|
||||
|
||||
|
@ -92,6 +92,7 @@ Plugin::Plugin (AudioEngine& e, Session& s)
|
||||
, _session (s)
|
||||
, _cycles (0)
|
||||
, _owner (0)
|
||||
, _for_impulse_analysis (false)
|
||||
, _have_presets (false)
|
||||
, _have_pending_stop_events (false)
|
||||
, _parameter_changed_since_last_preset (false)
|
||||
@ -108,6 +109,7 @@ Plugin::Plugin (const Plugin& other)
|
||||
, _info (other._info)
|
||||
, _cycles (0)
|
||||
, _owner (other._owner)
|
||||
, _for_impulse_analysis (false)
|
||||
, _have_presets (false)
|
||||
, _have_pending_stop_events (false)
|
||||
, _parameter_changed_since_last_preset (false)
|
||||
|
@ -3052,6 +3052,7 @@ PluginInsert::get_impulse_analysis_plugin()
|
||||
// during init() -- most notably block_size..
|
||||
// not great.
|
||||
ret = plugin_factory(_plugins[0]);
|
||||
ret->use_for_impulse_analysis ();
|
||||
ChanCount out (internal_output_streams ());
|
||||
if (ret->get_info ()->reconfigurable_io ()) {
|
||||
// populate get_info ()->n_inputs and ->n_outputs
|
||||
|
@ -69,6 +69,7 @@ intptr_t Session::vst_callback (
|
||||
static VstTimeInfo _timeinfo; // only uses as fallback
|
||||
VstTimeInfo* timeinfo;
|
||||
int32_t newflags = 0;
|
||||
bool used_for_impulse_analysis = false;
|
||||
|
||||
if (effect && effect->ptr1) {
|
||||
plug = (VSTPlugin *) (effect->ptr1);
|
||||
@ -77,6 +78,9 @@ intptr_t Session::vst_callback (
|
||||
DEBUG_TRACE (PBD::DEBUG::VSTCallbacks, string_compose ("am callback 0x%1%2, opcode = %3%4, plugin = \"%5\"\n",
|
||||
std::hex, (void*) DEBUG_THREAD_SELF,
|
||||
std::dec, opcode, plug->name()));
|
||||
if (plug->_for_impulse_analysis) {
|
||||
plug = 0;
|
||||
}
|
||||
} else {
|
||||
plug = 0;
|
||||
session = 0;
|
||||
|
Loading…
Reference in New Issue
Block a user