VST3: allow to debug TUID support

This commit is contained in:
Robin Gareus 2020-10-15 20:40:35 +02:00
parent e1b38058a8
commit 3271a96100
Signed by: rgareus
GPG Key ID: A090BCE02CF57F04
3 changed files with 28 additions and 0 deletions

View File

@ -26,6 +26,11 @@
#include "ardour/vst3_host.h"
#ifndef VST3_SCANNER_APP
#include "pbd/compose.h"
#include "ardour/debug.h"
#endif
using namespace Steinberg;
DEF_CLASS_IID (FUnknown)
@ -384,6 +389,14 @@ HostApplication::queryInterface (const char* _iid, void** obj)
return kResultOk;
}
#ifndef VST3_SCANNER_APP
if (DEBUG_ENABLED(PBD::DEBUG::VST3Config)) {
char fuid[33];
FUID::fromTUID (_iid).toString (fuid);
DEBUG_TRACE (PBD::DEBUG::VST3Config, string_compose ("HostApplication::queryInterface not supported: %1\n", fuid));
}
#endif
*obj = nullptr;
return kResultFalse;
}

View File

@ -987,6 +987,14 @@ VST3PI::VST3PI (boost::shared_ptr<ARDOUR::VST3PluginModule> m, std::string uniqu
throw failed_constructor ();
}
#ifndef NDEBUG
if (DEBUG_ENABLED(DEBUG::VST3Config)) {
char fuid[33];
_fuid.toString (fuid);
DEBUG_TRACE (DEBUG::VST3Config, string_compose ("VST3PI create instance %1\n", fuid));
}
#endif
if (factory->createInstance (_fuid.toTUID (), Vst::IComponent::iid, (void**)&_component) != kResultTrue) {
throw failed_constructor ();
}
@ -1286,6 +1294,12 @@ VST3PI::queryInterface (const TUID _iid, void** obj)
}
#endif
if (DEBUG_ENABLED(DEBUG::VST3Config)) {
char fuid[33];
FUID::fromTUID (_iid).toString (fuid);
DEBUG_TRACE (DEBUG::VST3Config, string_compose ("VST3PI::queryInterface not supported: %1\n", fuid));
}
*obj = nullptr;
return kNoInterface;
}

View File

@ -45,6 +45,7 @@ def build(bld):
obj.target = 'ardour-vst3-scanner'
obj.includes = [ '../pbd/', '../ardour/', '../vst3/', '..' ]
obj.defines = [
'VST3_SCANNER_APP',
'VERSIONSTRING="' + str(bld.env['VERSION']) + '"',
'PACKAGE="' + I18N_PACKAGE + str(bld.env['MAJOR']) + '"',
'LIBARDOUR="' + bld.env['lwrcase_dirname'] + '"',