VST3: add debug messages
This commit is contained in:
parent
b8157580c6
commit
c2125eedc6
@ -100,6 +100,9 @@ namespace PBD {
|
|||||||
LIBARDOUR_API extern DebugBits Transport;
|
LIBARDOUR_API extern DebugBits Transport;
|
||||||
LIBARDOUR_API extern DebugBits US2400;
|
LIBARDOUR_API extern DebugBits US2400;
|
||||||
LIBARDOUR_API extern DebugBits VCA;
|
LIBARDOUR_API extern DebugBits VCA;
|
||||||
|
LIBARDOUR_API extern DebugBits VST3Callbacks;
|
||||||
|
LIBARDOUR_API extern DebugBits VST3Config;
|
||||||
|
LIBARDOUR_API extern DebugBits VST3Process;
|
||||||
LIBARDOUR_API extern DebugBits VSTCallbacks;
|
LIBARDOUR_API extern DebugBits VSTCallbacks;
|
||||||
LIBARDOUR_API extern DebugBits WiimoteControl;
|
LIBARDOUR_API extern DebugBits WiimoteControl;
|
||||||
|
|
||||||
|
@ -95,5 +95,8 @@ PBD::DebugBits PBD::DEBUG::TempoMath = PBD::new_debug_bit ("tempomath");
|
|||||||
PBD::DebugBits PBD::DEBUG::Transport = PBD::new_debug_bit ("transport");
|
PBD::DebugBits PBD::DEBUG::Transport = PBD::new_debug_bit ("transport");
|
||||||
PBD::DebugBits PBD::DEBUG::US2400 = PBD::new_debug_bit ("us2400");
|
PBD::DebugBits PBD::DEBUG::US2400 = PBD::new_debug_bit ("us2400");
|
||||||
PBD::DebugBits PBD::DEBUG::VCA = PBD::new_debug_bit ("vca");
|
PBD::DebugBits PBD::DEBUG::VCA = PBD::new_debug_bit ("vca");
|
||||||
|
PBD::DebugBits PBD::DEBUG::VST3Callbacks = PBD::new_debug_bit ("VST3Callbacks");
|
||||||
|
PBD::DebugBits PBD::DEBUG::VST3Config = PBD::new_debug_bit ("VST3Config");
|
||||||
|
PBD::DebugBits PBD::DEBUG::VST3Process = PBD::new_debug_bit ("VST3Process");
|
||||||
PBD::DebugBits PBD::DEBUG::VSTCallbacks = PBD::new_debug_bit ("vstcallbacks");
|
PBD::DebugBits PBD::DEBUG::VSTCallbacks = PBD::new_debug_bit ("vstcallbacks");
|
||||||
PBD::DebugBits PBD::DEBUG::WiimoteControl = PBD::new_debug_bit ("wiimotecontrol");
|
PBD::DebugBits PBD::DEBUG::WiimoteControl = PBD::new_debug_bit ("wiimotecontrol");
|
||||||
|
@ -22,6 +22,7 @@
|
|||||||
#include "pbd/basename.h"
|
#include "pbd/basename.h"
|
||||||
#include "pbd/compose.h"
|
#include "pbd/compose.h"
|
||||||
#include "pbd/convert.h"
|
#include "pbd/convert.h"
|
||||||
|
#include "pbd/debug.h"
|
||||||
#include "pbd/error.h"
|
#include "pbd/error.h"
|
||||||
#include "pbd/failed_constructor.h"
|
#include "pbd/failed_constructor.h"
|
||||||
#include "pbd/file_utils.h"
|
#include "pbd/file_utils.h"
|
||||||
@ -34,6 +35,7 @@
|
|||||||
|
|
||||||
#include "ardour/audio_buffer.h"
|
#include "ardour/audio_buffer.h"
|
||||||
#include "ardour/audioengine.h"
|
#include "ardour/audioengine.h"
|
||||||
|
#include "ardour/debug.h"
|
||||||
#include "ardour/session.h"
|
#include "ardour/session.h"
|
||||||
#include "ardour/stripable.h"
|
#include "ardour/stripable.h"
|
||||||
#include "ardour/tempo.h"
|
#include "ardour/tempo.h"
|
||||||
@ -71,6 +73,7 @@ VST3Plugin::~VST3Plugin ()
|
|||||||
void
|
void
|
||||||
VST3Plugin::init ()
|
VST3Plugin::init ()
|
||||||
{
|
{
|
||||||
|
DEBUG_TRACE (DEBUG::VST3Config, string_compose ("VST3 instantiating: %1\n", get_info()->unique_id));
|
||||||
Vst::ProcessContext& context (_plug->context ());
|
Vst::ProcessContext& context (_plug->context ());
|
||||||
context.sampleRate = _session.nominal_sample_rate ();
|
context.sampleRate = _session.nominal_sample_rate ();
|
||||||
_plug->set_block_size (_session.get_block_size ());
|
_plug->set_block_size (_session.get_block_size ());
|
||||||
@ -372,9 +375,7 @@ VST3PI::vst3_to_midi_buffers (BufferSet& bufs, ChanMapping const& out_map)
|
|||||||
bool valid = false;
|
bool valid = false;
|
||||||
uint32_t index = out_map.get (DataType::MIDI, e.busIndex, &valid);
|
uint32_t index = out_map.get (DataType::MIDI, e.busIndex, &valid);
|
||||||
if (!valid || bufs.count().n_midi() <= index) {
|
if (!valid || bufs.count().n_midi() <= index) {
|
||||||
#ifndef NDEBUG
|
DEBUG_TRACE (DEBUG::VST3Process, string_compose ("VST3PI::vst3_to_midi_buffers - Invalid MIDI Bus %1\n", e.busIndex));
|
||||||
printf ("VST3PI::vst3_to_midi_buffers - Invalid MIDI Bus %d\n", e.busIndex);
|
|
||||||
#endif
|
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -571,7 +572,7 @@ VST3Plugin::connect_and_run (BufferSet& bufs,
|
|||||||
ChanMapping const& in_map, ChanMapping const& out_map,
|
ChanMapping const& in_map, ChanMapping const& out_map,
|
||||||
pframes_t n_samples, samplecnt_t offset)
|
pframes_t n_samples, samplecnt_t offset)
|
||||||
{
|
{
|
||||||
//DEBUG_TRACE(DEBUG::VST3, string_compose("%1 run %2 offset %3\n", name(), nframes, offset));
|
DEBUG_TRACE (DEBUG::VST3Process, string_compose ("%1 run %2 offset %3\n", name(), n_samples, offset));
|
||||||
Plugin::connect_and_run (bufs, start, end, speed, in_map, out_map, n_samples, offset);
|
Plugin::connect_and_run (bufs, start, end, speed, in_map, out_map, n_samples, offset);
|
||||||
|
|
||||||
Vst::ProcessContext& context (_plug->context ());
|
Vst::ProcessContext& context (_plug->context ());
|
||||||
@ -714,9 +715,7 @@ VST3Plugin::load_preset (PresetRecord r)
|
|||||||
int program = PBD::atoi (tmp[2]);
|
int program = PBD::atoi (tmp[2]);
|
||||||
assert (!r.user);
|
assert (!r.user);
|
||||||
if (!_plug->set_program (program, 0)) {
|
if (!_plug->set_program (program, 0)) {
|
||||||
#ifndef NDEBUG
|
DEBUG_TRACE (DEBUG::VST3Config, string_compose ("VST3Plugin::load_preset: set_program failed (pgm: %1 plug: %2)\n", program, name ()));
|
||||||
std::cerr << "set_program failed\n";
|
|
||||||
#endif
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
ok = true;
|
ok = true;
|
||||||
@ -923,13 +922,8 @@ VST3PluginInfo::load (Session& session)
|
|||||||
{
|
{
|
||||||
try {
|
try {
|
||||||
if (!m) {
|
if (!m) {
|
||||||
#ifndef NDEBUG
|
DEBUG_TRACE (DEBUG::VST3Config, string_compose ("VST3 Loading: %1\n", path));
|
||||||
printf ("Loading %s\n", path.c_str ());
|
|
||||||
#endif
|
|
||||||
m = VST3PluginModule::load (path);
|
m = VST3PluginModule::load (path);
|
||||||
#ifndef NDEBUG
|
|
||||||
printf ("Loaded module\n");
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
PluginPtr plugin;
|
PluginPtr plugin;
|
||||||
Steinberg::VST3PI* plug = new VST3PI (m, unique_id);
|
Steinberg::VST3PI* plug = new VST3PI (m, unique_id);
|
||||||
@ -1194,9 +1188,7 @@ VST3PI::connect_components ()
|
|||||||
|
|
||||||
res = controllerCP->connect (this);
|
res = controllerCP->connect (this);
|
||||||
if (!(res == kResultOk || res == kNotImplemented)) {
|
if (!(res == kResultOk || res == kNotImplemented)) {
|
||||||
#ifndef NDEBUG
|
DEBUG_TRACE (DEBUG::VST3Config, "VST3PI::connect_components Cannot connect controller, ignored.\n");
|
||||||
std::cerr << "VST3: Cannot connect controller, ignored.\n";
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
@ -1240,9 +1232,7 @@ VST3PI::disconnect (Vst::IConnectionPoint* other)
|
|||||||
tresult
|
tresult
|
||||||
VST3PI::notify (Vst::IMessage* msg)
|
VST3PI::notify (Vst::IMessage* msg)
|
||||||
{
|
{
|
||||||
#ifndef NDEBUG
|
DEBUG_TRACE (DEBUG::VST3Callbacks, "VST3PI::notify.\n");
|
||||||
std::cerr << "VST3PI::notify\n";
|
|
||||||
#endif
|
|
||||||
for (std::vector <Vst::IConnectionPoint*>::const_iterator i = _connections.begin(); i != _connections.end(); ++i) {
|
for (std::vector <Vst::IConnectionPoint*>::const_iterator i = _connections.begin(); i != _connections.end(); ++i) {
|
||||||
/* TODO delegate to GUI thread if available
|
/* TODO delegate to GUI thread if available
|
||||||
* see ./libs/pbd/pbd/event_loop.h ir->call_slot ()
|
* see ./libs/pbd/pbd/event_loop.h ir->call_slot ()
|
||||||
@ -1297,9 +1287,8 @@ VST3PI::queryInterface (const TUID _iid, void** obj)
|
|||||||
tresult
|
tresult
|
||||||
VST3PI::restartComponent (int32 flags)
|
VST3PI::restartComponent (int32 flags)
|
||||||
{
|
{
|
||||||
#ifndef NDEBUG
|
DEBUG_TRACE (DEBUG::VST3Callbacks, string_compose ("VST3PI::restartComponent %1%2\n", std::hex, flags));
|
||||||
printf ("VST3PI::restartComponent %x\n", flags);
|
|
||||||
#endif
|
|
||||||
if (flags & Vst::kReloadComponent) {
|
if (flags & Vst::kReloadComponent) {
|
||||||
/* according to the spec, "The host has to unload completely
|
/* according to the spec, "The host has to unload completely
|
||||||
* the plug-in (controller/processor) and reload it."
|
* the plug-in (controller/processor) and reload it."
|
||||||
@ -2039,9 +2028,7 @@ VST3PI::process (float** ins, float** outs, uint32_t n_samples)
|
|||||||
|
|
||||||
/* and go */
|
/* and go */
|
||||||
if (_processor->process (data) != kResultOk) {
|
if (_processor->process (data) != kResultOk) {
|
||||||
#ifndef NDEBUG
|
DEBUG_TRACE (DEBUG::VST3Process, "VST3 process error\n");
|
||||||
std::cerr << "VST3: Process error\n"; // XXX
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* handle output parameter changes */
|
/* handle output parameter changes */
|
||||||
@ -2171,16 +2158,12 @@ VST3PI::load_state (RAMStream& stream)
|
|||||||
&& list_offset > 0
|
&& list_offset > 0
|
||||||
)
|
)
|
||||||
) {
|
) {
|
||||||
#ifndef NDEBUG
|
DEBUG_TRACE (DEBUG::VST3Config, string_compose ("VST3PI::load_state: invalid header vers: %1 off: %2\n", version, list_offset));
|
||||||
printf ("VST3PI::load_state: invalid header v%d s:%lld\n", version, list_offset);
|
|
||||||
#endif
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (_fuid != FUID::fromTUID (class_id)) {
|
if (_fuid != FUID::fromTUID (class_id)) {
|
||||||
#ifndef NDEBUG
|
DEBUG_TRACE (DEBUG::VST3Config, "VST3PI::load_state: class ID mismatch\n");
|
||||||
std::cerr << "VST3PI::load_state: class ID mismatch\n";
|
|
||||||
#endif
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2225,9 +2208,7 @@ VST3PI::load_state (RAMStream& stream)
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (!(re2 == kResultOk || re2 == kNotImplemented || res == kResultOk || res == kNotImplemented)) {
|
if (!(re2 == kResultOk || re2 == kNotImplemented || res == kResultOk || res == kNotImplemented)) {
|
||||||
#ifndef NDEBUG
|
DEBUG_TRACE (DEBUG::VST3Config, "VST3PI::load_state: failed to restore component state\n");
|
||||||
std::cerr << "VST3: failed to restore component state\n";
|
|
||||||
#endif
|
|
||||||
rv = false;
|
rv = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -2235,9 +2216,7 @@ VST3PI::load_state (RAMStream& stream)
|
|||||||
ROMStream s (stream, i->_offset, i->_size);
|
ROMStream s (stream, i->_offset, i->_size);
|
||||||
tresult res = _controller->setState (&s);
|
tresult res = _controller->setState (&s);
|
||||||
if (!(res == kResultOk || res == kNotImplemented)) {
|
if (!(res == kResultOk || res == kNotImplemented)) {
|
||||||
#ifndef NDEBUG
|
DEBUG_TRACE (DEBUG::VST3Config, "VST3PI::load_state: failed to restore controller state\n");
|
||||||
std::cerr << "VST3: failed to restore controller state\n";
|
|
||||||
#endif
|
|
||||||
rv = false;
|
rv = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -2251,9 +2230,7 @@ VST3PI::load_state (RAMStream& stream)
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
else {
|
else {
|
||||||
#ifndef NDEBUG
|
DEBUG_TRACE (DEBUG::VST3Config, "VST3PI::load_state: ignored unsupported state chunk.\n");
|
||||||
std::cerr << "VST3: ignored unsupported state chunk.\n";
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2321,6 +2298,8 @@ VST3PI::stripable_property_changed (PBD::PropertyChange const&)
|
|||||||
Stripable* s = dynamic_cast<Stripable*> (_owner);
|
Stripable* s = dynamic_cast<Stripable*> (_owner);
|
||||||
assert (il && s);
|
assert (il && s);
|
||||||
|
|
||||||
|
DEBUG_TRACE (DEBUG::VST3Callbacks, "VST3PI::stripable_property_changed\n");
|
||||||
|
|
||||||
IPtr<HostAttributeList> al (new HostAttributeList ());
|
IPtr<HostAttributeList> al (new HostAttributeList ());
|
||||||
|
|
||||||
Vst::String128 tmp;
|
Vst::String128 tmp;
|
||||||
@ -2368,6 +2347,7 @@ VST3PI::setup_info_listener ()
|
|||||||
if (!il) {
|
if (!il) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
DEBUG_TRACE (DEBUG::VST3Config, "VST3PI::setup_info_listener\n");
|
||||||
Stripable* s = dynamic_cast<Stripable*> (_owner);
|
Stripable* s = dynamic_cast<Stripable*> (_owner);
|
||||||
|
|
||||||
s->PropertyChanged.connect_same_thread (_strip_connections, boost::bind (&VST3PI::stripable_property_changed, this, _1));
|
s->PropertyChanged.connect_same_thread (_strip_connections, boost::bind (&VST3PI::stripable_property_changed, this, _1));
|
||||||
@ -2475,6 +2455,7 @@ VST3PI::getContextInfoValue (int32& value, FIDString id)
|
|||||||
Stripable* s = dynamic_cast<Stripable*> (_owner);
|
Stripable* s = dynamic_cast<Stripable*> (_owner);
|
||||||
assert (s);
|
assert (s);
|
||||||
|
|
||||||
|
DEBUG_TRACE (DEBUG::VST3Callbacks, string_compose ("VST3PI::getContextInfoValue<int> %1\n", id));
|
||||||
if (0 == strcmp (id, ContextInfo::kIndexMode)) {
|
if (0 == strcmp (id, ContextInfo::kIndexMode)) {
|
||||||
value = ContextInfo::kPerTypeIndex;
|
value = ContextInfo::kPerTypeIndex;
|
||||||
} else if (0 == strcmp (id, ContextInfo::kType)) {
|
} else if (0 == strcmp (id, ContextInfo::kType)) {
|
||||||
@ -2519,6 +2500,7 @@ VST3PI::getContextInfoValue (int32& value, FIDString id)
|
|||||||
value = ac->self_soloed ();
|
value = ac->self_soloed ();
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
DEBUG_TRACE (DEBUG::VST3Callbacks, "VST3PI::getContextInfoValue<int>: unsupported ID\n");
|
||||||
return kNotImplemented;
|
return kNotImplemented;
|
||||||
}
|
}
|
||||||
return kResultOk;
|
return kResultOk;
|
||||||
@ -2530,7 +2512,7 @@ VST3PI::getContextInfoString (Vst::TChar* string, int32 max_len, FIDString id)
|
|||||||
if (!_owner) {
|
if (!_owner) {
|
||||||
return kNotInitialized;
|
return kNotInitialized;
|
||||||
}
|
}
|
||||||
|
DEBUG_TRACE (DEBUG::VST3Callbacks, string_compose ("VST3PI::getContextInfoValue<string> %1\n", id));
|
||||||
if (0 == strcmp (id, ContextInfo::kID)) {
|
if (0 == strcmp (id, ContextInfo::kID)) {
|
||||||
utf8_to_tchar (string, _owner->id().to_s (), max_len);
|
utf8_to_tchar (string, _owner->id().to_s (), max_len);
|
||||||
return kResultOk;
|
return kResultOk;
|
||||||
@ -2550,6 +2532,7 @@ VST3PI::getContextInfoString (Vst::TChar* string, int32 max_len, FIDString id)
|
|||||||
} else {
|
} else {
|
||||||
boost::shared_ptr<AutomationControl> ac = lookup_ac (_owner, id);
|
boost::shared_ptr<AutomationControl> ac = lookup_ac (_owner, id);
|
||||||
if (!ac) {
|
if (!ac) {
|
||||||
|
DEBUG_TRACE (DEBUG::VST3Callbacks, "VST3PI::getContextInfoValue<string>: unsupported ID\n");
|
||||||
return kInvalidArgument;
|
return kInvalidArgument;
|
||||||
}
|
}
|
||||||
utf8_to_tchar (string, ac->get_user_string (), max_len);
|
utf8_to_tchar (string, ac->get_user_string (), max_len);
|
||||||
@ -2564,6 +2547,7 @@ VST3PI::getContextInfoValue (double& value, FIDString id)
|
|||||||
if (!s) {
|
if (!s) {
|
||||||
return kNotInitialized;
|
return kNotInitialized;
|
||||||
}
|
}
|
||||||
|
DEBUG_TRACE (DEBUG::VST3Callbacks, string_compose ("VST3PI::getContextInfoValue<double> %1\n", id));
|
||||||
if (0 == strcmp (id, ContextInfo::kMaxVolume)) {
|
if (0 == strcmp (id, ContextInfo::kMaxVolume)) {
|
||||||
value = 2.0; // Config->get_max_gain();
|
value = 2.0; // Config->get_max_gain();
|
||||||
} else if (0 == strcmp (id, ContextInfo::kMaxSendLevel)) {
|
} else if (0 == strcmp (id, ContextInfo::kMaxSendLevel)) {
|
||||||
@ -2589,6 +2573,7 @@ VST3PI::getContextInfoValue (double& value, FIDString id)
|
|||||||
return kInvalidArgument; // send index out of bounds
|
return kInvalidArgument; // send index out of bounds
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
DEBUG_TRACE (DEBUG::VST3Callbacks, "VST3PI::getContextInfoValue<double>: unsupported ID\n");
|
||||||
return kInvalidArgument;
|
return kInvalidArgument;
|
||||||
}
|
}
|
||||||
return kResultOk;
|
return kResultOk;
|
||||||
@ -2600,6 +2585,7 @@ VST3PI::setContextInfoValue (FIDString id, double value)
|
|||||||
if (!_owner) {
|
if (!_owner) {
|
||||||
return kNotInitialized;
|
return kNotInitialized;
|
||||||
}
|
}
|
||||||
|
DEBUG_TRACE (DEBUG::VST3Callbacks, string_compose ("VST3PI::setContextInfoValue<double> %1 to %2\n", id, value));
|
||||||
if (0 == strcmp (id, ContextInfo::kVolume)) {
|
if (0 == strcmp (id, ContextInfo::kVolume)) {
|
||||||
boost::shared_ptr<AutomationControl> ac = lookup_ac (_owner, id);
|
boost::shared_ptr<AutomationControl> ac = lookup_ac (_owner, id);
|
||||||
ac->set_value (value, Controllable::NoGroup);
|
ac->set_value (value, Controllable::NoGroup);
|
||||||
@ -2616,6 +2602,7 @@ VST3PI::setContextInfoValue (FIDString id, double value)
|
|||||||
return kInvalidArgument; // send index out of bounds
|
return kInvalidArgument; // send index out of bounds
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
DEBUG_TRACE (DEBUG::VST3Callbacks, "VST3PI::setContextInfoValue<double>: unsupported ID\n");
|
||||||
return kInvalidArgument;
|
return kInvalidArgument;
|
||||||
}
|
}
|
||||||
return kResultOk;
|
return kResultOk;
|
||||||
@ -2628,6 +2615,7 @@ VST3PI::setContextInfoValue (FIDString id, int32 value)
|
|||||||
if (!s) {
|
if (!s) {
|
||||||
return kNotInitialized;
|
return kNotInitialized;
|
||||||
}
|
}
|
||||||
|
DEBUG_TRACE (DEBUG::VST3Callbacks, string_compose ("VST3PI::setContextInfoValue<int> %1 to %2\n", id, value));
|
||||||
if (0 == strcmp (id, ContextInfo::kColor)) {
|
if (0 == strcmp (id, ContextInfo::kColor)) {
|
||||||
#if BYTEORDER == kBigEndian
|
#if BYTEORDER == kBigEndian
|
||||||
SWAP_32 (value) // ABGR32 -> RGBA32
|
SWAP_32 (value) // ABGR32 -> RGBA32
|
||||||
@ -2642,6 +2630,7 @@ VST3PI::setContextInfoValue (FIDString id, int32 value)
|
|||||||
} else if (0 == strcmp (id, ContextInfo::kSolo)) {
|
} else if (0 == strcmp (id, ContextInfo::kSolo)) {
|
||||||
s->solo_control()->set_value (value != 0, Controllable::NoGroup);
|
s->solo_control()->set_value (value != 0, Controllable::NoGroup);
|
||||||
} else {
|
} else {
|
||||||
|
DEBUG_TRACE (DEBUG::VST3Callbacks, "VST3PI::setContextInfoValue<int>: unsupported ID\n");
|
||||||
return kNotImplemented;
|
return kNotImplemented;
|
||||||
}
|
}
|
||||||
return kResultOk;
|
return kResultOk;
|
||||||
@ -2653,9 +2642,11 @@ VST3PI::setContextInfoString (FIDString id, Vst::TChar* string)
|
|||||||
if (!_owner) {
|
if (!_owner) {
|
||||||
return kNotInitialized;
|
return kNotInitialized;
|
||||||
}
|
}
|
||||||
|
DEBUG_TRACE (DEBUG::VST3Callbacks, string_compose ("VST3PI::setContextInfoValue<string> %1 to %2\n", id, tchar_to_utf8 (string)));
|
||||||
if (0 == strcmp (id, ContextInfo::kName)) {
|
if (0 == strcmp (id, ContextInfo::kName)) {
|
||||||
return _owner->set_name (tchar_to_utf8 (string)) ? kResultOk : kResultFalse;
|
return _owner->set_name (tchar_to_utf8 (string)) ? kResultOk : kResultFalse;
|
||||||
}
|
}
|
||||||
|
DEBUG_TRACE (DEBUG::VST3Callbacks, "VST3PI::setContextInfoValue<string>: unsupported ID\n");
|
||||||
return kInvalidArgument;
|
return kInvalidArgument;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2669,6 +2660,7 @@ VST3PI::beginEditContextInfoValue (FIDString id)
|
|||||||
if (!ac) {
|
if (!ac) {
|
||||||
return kInvalidArgument;
|
return kInvalidArgument;
|
||||||
}
|
}
|
||||||
|
DEBUG_TRACE (DEBUG::VST3Callbacks, string_compose ("VST3PI::beginEditContextInfoValue %1\n", id));
|
||||||
ac->start_touch (ac->session().transport_sample());
|
ac->start_touch (ac->session().transport_sample());
|
||||||
return kResultOk;
|
return kResultOk;
|
||||||
}
|
}
|
||||||
@ -2683,6 +2675,7 @@ VST3PI::endEditContextInfoValue (FIDString id)
|
|||||||
if (!ac) {
|
if (!ac) {
|
||||||
return kInvalidArgument;
|
return kInvalidArgument;
|
||||||
}
|
}
|
||||||
|
DEBUG_TRACE (DEBUG::VST3Callbacks, string_compose ("VST3PI::endEditContextInfoValue %1\n", id));
|
||||||
ac->stop_touch (ac->session().transport_sample());
|
ac->stop_touch (ac->session().transport_sample());
|
||||||
return kResultOk;
|
return kResultOk;
|
||||||
}
|
}
|
||||||
@ -2701,6 +2694,7 @@ VST3PI::psl_subscribe_to (boost::shared_ptr<ARDOUR::AutomationControl> ac, FIDSt
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
DEBUG_TRACE (DEBUG::VST3Callbacks, string_compose ("VST3PI::psl_subscribe_to: %1\n", ac->name ()));
|
||||||
ac->Changed.connect_same_thread (_ac_connection_list, boost::bind (&VST3PI::foward_signal, this, nfo2.get(), id));
|
ac->Changed.connect_same_thread (_ac_connection_list, boost::bind (&VST3PI::foward_signal, this, nfo2.get(), id));
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2708,6 +2702,7 @@ void
|
|||||||
VST3PI::foward_signal (IContextInfoHandler2* handler, FIDString id) const
|
VST3PI::foward_signal (IContextInfoHandler2* handler, FIDString id) const
|
||||||
{
|
{
|
||||||
assert (handler);
|
assert (handler);
|
||||||
|
DEBUG_TRACE (DEBUG::VST3Callbacks, string_compose ("VST3PI::psl_subscribtion AC changed %1\n", id));
|
||||||
handler->notifyContextInfoChange (id);
|
handler->notifyContextInfoChange (id);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2723,6 +2718,8 @@ VST3PI::psl_stripable_property_changed (PBD::PropertyChange const& what_changed)
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
DEBUG_TRACE (DEBUG::VST3Callbacks, "VST3PI::psl_stripable_property_changed\n");
|
||||||
|
|
||||||
if (what_changed.contains (Properties::selected)) {
|
if (what_changed.contains (Properties::selected)) {
|
||||||
nfo2->notifyContextInfoChange ("ContextInfo::kSelected");
|
nfo2->notifyContextInfoChange ("ContextInfo::kSelected");
|
||||||
//nfo2->notifyContextInfoChange ("ContextInfo::kFocused");
|
//nfo2->notifyContextInfoChange ("ContextInfo::kFocused");
|
||||||
@ -2750,6 +2747,8 @@ VST3PI::setup_psl_info_handler ()
|
|||||||
nfo->notifyContextInfoChange ();
|
nfo->notifyContextInfoChange ();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
DEBUG_TRACE (DEBUG::VST3Config, string_compose ("VST3PI::setup_psl_info_handler: (%1) (%2)\n", nfo != 0, nfo2 !=0));
|
||||||
|
|
||||||
if (!nfo && !nfo2) {
|
if (!nfo && !nfo2) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user