Ardour  9.7-113-g8655718b29
vst3_host.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2019-2020 Robin Gareus <robin@gareus.org>
3  *
4  * This program is free software; you can redistribute it and/or modify
5  * it under the terms of the GNU General Public License as published by
6  * the Free Software Foundation; either version 2 of the License, or
7  * (at your option) any later version.
8  *
9  * This program is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12  * GNU General Public License for more details.
13  *
14  * You should have received a copy of the GNU General Public License along
15  * with this program; if not, write to the Free Software Foundation, Inc.,
16  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
17  */
18 
19 #ifndef _ardour_vst3_host_h_
20 #define _ardour_vst3_host_h_
21 
22 #include <atomic>
23 #include <cstdint>
24 #include <map>
25 #include <memory>
26 #include <string>
27 #include <vector>
28 
29 #include <glib.h>
30 
32 #include "vst3/vst3.h"
33 
34 #define QUERY_INTERFACE_IMPL(Interface) \
35 tresult PLUGIN_API queryInterface (const TUID _iid, void** obj) SMTG_OVERRIDE \
36 { \
37  QUERY_INTERFACE (_iid, obj, FUnknown::iid, Interface) \
38  QUERY_INTERFACE (_iid, obj, Interface::iid, Interface) \
39  *obj = nullptr; \
40  return kNoInterface; \
41 }
42 
43 #if defined(__clang__)
44 # pragma clang diagnostic push
45 # pragma clang diagnostic ignored "-Wnon-virtual-dtor"
46 # pragma clang diagnostic ignored "-Wdelete-non-virtual-dtor"
47 # pragma clang diagnostic ignored "-Wdelete-non-abstract-non-virtual-dtor"
48 #elif __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 7)
49 # pragma GCC diagnostic push
50 # pragma GCC diagnostic ignored "-Wnon-virtual-dtor"
51 # pragma GCC diagnostic ignored "-Wdelete-non-virtual-dtor"
52 #endif
53 
54 namespace ARDOUR {
55  class Session;
56 }
57 
58 namespace Steinberg {
59 
60 LIBARDOUR_API extern std::string tchar_to_utf8 (Vst::TChar const* s);
61 LIBARDOUR_API extern Glib::ustring tchar_to_ustring (Vst::TChar const* s);
62 LIBARDOUR_API extern bool utf8_to_tchar (Vst::TChar* rv, const char* s, size_t l = 0);
63 LIBARDOUR_API extern bool utf8_to_tchar (Vst::TChar* rv, std::string const& s, size_t l = 0);
64 
65 namespace Vst {
66  /* see public.sdk/source/vst/vstpresetfile.cpp */
67  typedef char ChunkID[4]; // using ChunkID = char[4];
68  static const int32 kClassIDSize = 32; // ASCII-encoded FUID
69  static const int32 kHeaderSize = sizeof (ChunkID) + sizeof (int32) + kClassIDSize + sizeof (TSize);
70  static const int32 kListOffsetPos = kHeaderSize - sizeof (TSize);
71 } // namespace Vst
72 
74 {
75 public:
76  enum Type {
80  kBinary
81  };
82 
83  HostAttribute (int64 value)
84  : _size (0)
85  , _type (kInteger)
86  {
87  v.intValue = value;
88  }
89 
90  HostAttribute (double value)
91  : _size (0)
92  , _type (kFloat)
93  {
94  v.floatValue = value;
95  }
96 
97  HostAttribute (const Vst::TChar* value, uint32 size)
98  : _size (size)
99  , _type (kString)
100  {
101  v.stringValue = new Vst::TChar[_size + 1];
102  memcpy (v.stringValue, value, _size * sizeof (Vst::TChar));
103  v.stringValue[size] = 0;
104  }
105 
106  HostAttribute (const void* value, uint32 size)
107  : _size (size)
108  , _type (kBinary)
109  {
110  v.binaryValue = new char[_size];
111  memcpy (v.binaryValue, value, _size);
112  }
113 
115  {
116  if (_size) {
117  delete[] v.binaryValue;
118  }
119  }
120 
121  Type getType () const { return _type; }
122  int64 intValue () const { return v.intValue; }
123  double floatValue () const { return v.floatValue; }
124 
125  const Vst::TChar* stringValue (uint32& stringSize)
126  {
127  stringSize = _size;
128  return v.stringValue;
129  }
130 
131  const void* binaryValue (uint32& binarySize)
132  {
133  binarySize = _size;
134  return v.binaryValue;
135  }
136 
137 protected:
138  union v {
139  int64 intValue;
140  double floatValue;
141  Vst::TChar* stringValue;
142  char* binaryValue;
143  } v;
144 
145  uint32 _size;
147 
148 private:
149  /* prevent copy construction */
150  HostAttribute (HostAttribute const& other);
151 };
152 
153 class LIBARDOUR_API RefObject : public FUnknown
154 {
155 public:
157  virtual ~RefObject () {}
158  uint32 PLUGIN_API addRef () SMTG_OVERRIDE;
159  uint32 PLUGIN_API release () SMTG_OVERRIDE;
160 
161 private:
162  std::atomic<int> _cnt; // atomic
163 };
164 
165 class LIBARDOUR_API HostAttributeList : public Vst::IAttributeList, public RefObject
166 {
167 public:
169  virtual ~HostAttributeList ();
170 
171  QUERY_INTERFACE_IMPL (Vst::IAttributeList);
172 
173  uint32 PLUGIN_API addRef () SMTG_OVERRIDE
174  {
175  return RefObject::addRef ();
176  }
177 
178  uint32 PLUGIN_API release () SMTG_OVERRIDE
179  {
180  return RefObject::release ();
181  }
182 
183  tresult PLUGIN_API setInt (AttrID aid, int64 value) SMTG_OVERRIDE;
184  tresult PLUGIN_API getInt (AttrID aid, int64& value) SMTG_OVERRIDE;
185  tresult PLUGIN_API setFloat (AttrID aid, double value) SMTG_OVERRIDE;
186  tresult PLUGIN_API getFloat (AttrID aid, double& value) SMTG_OVERRIDE;
187  tresult PLUGIN_API setString (AttrID aid, const Vst::TChar* string) SMTG_OVERRIDE;
188  tresult PLUGIN_API getString (AttrID aid, Vst::TChar* string, uint32 size) SMTG_OVERRIDE;
189  tresult PLUGIN_API setBinary (AttrID aid, const void* data, uint32 size) SMTG_OVERRIDE;
190  tresult PLUGIN_API getBinary (AttrID aid, const void*& data, uint32& size) SMTG_OVERRIDE;
191 
192 protected:
193  void removeAttrID (AttrID aid);
194 
195  std::map<std::string, HostAttribute*> list;
196 };
197 
198 class LIBARDOUR_API HostMessage : public Vst::IMessage, public RefObject
199 {
200 public:
202  virtual ~HostMessage ();
203 
204  QUERY_INTERFACE_IMPL (Vst::IMessage);
205 
206  uint32 PLUGIN_API addRef () SMTG_OVERRIDE
207  {
208  return RefObject::addRef ();
209  }
210 
211  uint32 PLUGIN_API release () SMTG_OVERRIDE
212  {
213  return RefObject::release ();
214  }
215 
216  const char* PLUGIN_API getMessageID () SMTG_OVERRIDE;
217  void PLUGIN_API setMessageID (const char* messageID) SMTG_OVERRIDE;
218  Vst::IAttributeList* PLUGIN_API getAttributes () SMTG_OVERRIDE;
219 
220 protected:
221  char* _messageId;
222  std::shared_ptr<HostAttributeList> _attribute_list;
223 };
224 
225 class LIBARDOUR_API ConnectionProxy : public Vst::IConnectionPoint, public RefObject
226 {
227 public:
228  ConnectionProxy (IConnectionPoint* src);
229  ~ConnectionProxy () SMTG_OVERRIDE;
230 
231  QUERY_INTERFACE_IMPL (Vst::IConnectionPoint);
232 
233  uint32 PLUGIN_API addRef () SMTG_OVERRIDE
234  {
235  return RefObject::addRef ();
236  }
237 
238  uint32 PLUGIN_API release () SMTG_OVERRIDE
239  {
240  return RefObject::release ();
241  }
242 
243  /* IConnectionPoint API */
244  tresult PLUGIN_API connect (Vst::IConnectionPoint*) SMTG_OVERRIDE;
245  tresult PLUGIN_API disconnect (Vst::IConnectionPoint*) SMTG_OVERRIDE;
246  tresult PLUGIN_API notify (Vst::IMessage*) SMTG_OVERRIDE;
247 
248  bool disconnect ();
249 
250 protected:
251  IConnectionPoint* _src;
252  IConnectionPoint* _dst;
253 };
254 
255 class LIBARDOUR_API PlugInterfaceSupport : public Vst::IPlugInterfaceSupport
256 {
257 public:
259  QUERY_INTERFACE_IMPL (Vst::IPlugInterfaceSupport);
260 
261  uint32 PLUGIN_API addRef () SMTG_OVERRIDE
262  {
263  return 1;
264  }
265 
266  uint32 PLUGIN_API release () SMTG_OVERRIDE
267  {
268  return 1;
269  }
270 
271  tresult PLUGIN_API isPlugInterfaceSupported (const TUID) SMTG_OVERRIDE;
272 
273  void addPlugInterfaceSupported (const TUID);
274 
275 private:
276  std::vector<FUID> _interfaces;
277 };
278 
279 class LIBARDOUR_API HostApplication : public Vst::IHostApplication , public Presonus::IContextInfoProvider
280 {
281 public:
282  static Vst::IHostApplication* getHostContext ()
283  {
284  static HostApplication* app = new HostApplication;
285  return app;
286  }
287 
289  return static_cast<HostApplication*> (getHostContext ());
290  }
291 
292  virtual ~HostApplication () {}
293  tresult PLUGIN_API queryInterface (const TUID _iid, void** obj) SMTG_OVERRIDE;
294 
295  uint32 PLUGIN_API addRef () SMTG_OVERRIDE
296  {
297  return 1;
298  }
299 
300  uint32 PLUGIN_API release () SMTG_OVERRIDE
301  {
302  return 1;
303  }
304 
305  tresult PLUGIN_API getName (Vst::String128 name) SMTG_OVERRIDE;
306  tresult PLUGIN_API createInstance (TUID cid, TUID _iid, void** obj) SMTG_OVERRIDE;
307 
309 
310  /* IContextInfoProvider API */
311  tresult PLUGIN_API getContextInfoValue (int32&, FIDString) SMTG_OVERRIDE;
312  tresult PLUGIN_API getContextInfoString (Vst::TChar*, int32, FIDString) SMTG_OVERRIDE;
313 
314 protected:
315  std::unique_ptr<PlugInterfaceSupport> _plug_interface_support;
316 private:
319 };
320 
321 class LIBARDOUR_LOCAL Vst3ParamValueQueue : public Vst::IParamValueQueue
322 {
323 public:
324  QUERY_INTERFACE_IMPL (Vst::IParamValueQueue);
325 
326  uint32 PLUGIN_API addRef () SMTG_OVERRIDE
327  {
328  return 1;
329  }
330 
331  uint32 PLUGIN_API release () SMTG_OVERRIDE
332  {
333  return 1;
334  }
335 
336  static const int maxNumPoints = 64;
337 
338  Vst3ParamValueQueue ()
339  {
340  _values.reserve (maxNumPoints);
341  _id = Vst::kNoParamId;
342  }
343 
344  Vst::ParamID PLUGIN_API getParameterId () SMTG_OVERRIDE
345  {
346  return _id;
347  }
348 
349  void setParameterId (Vst::ParamID id)
350  {
351  _values.clear ();
352  _id = id;
353  }
354 
355  int32 PLUGIN_API getPointCount () SMTG_OVERRIDE
356  {
357  return _values.size ();
358  }
359 
360  tresult PLUGIN_API getPoint (int32 index, int32&, Vst::ParamValue&) SMTG_OVERRIDE;
361  tresult PLUGIN_API addPoint (int32, Vst::ParamValue, int32&) SMTG_OVERRIDE;
362 
363 protected:
364  struct Value {
365  Value (Vst::ParamValue v, int32 offset)
366  : value (v)
367  , sampleOffset (offset)
368  {}
369 
370  Vst::ParamValue value;
371  int32 sampleOffset;
372  };
373 
374  std::vector<Value> _values;
375  Vst::ParamID _id;
376 };
377 
378 class LIBARDOUR_LOCAL Vst3ParameterChanges : public Vst::IParameterChanges
379 {
380 public:
381  QUERY_INTERFACE_IMPL (Vst::IParameterChanges);
382 
383  uint32 PLUGIN_API addRef () SMTG_OVERRIDE
384  {
385  return 1;
386  }
387 
388  uint32 PLUGIN_API release () SMTG_OVERRIDE
389  {
390  return 1;
391  }
392 
393  Vst3ParameterChanges ()
394  {
395  clear ();
396  }
397 
398  void set_n_params (int n)
399  {
400  _queue.resize (n);
401  }
402 
403  void clear ()
404  {
405  _used_queue_count = 0;
406  }
407 
408  int32 PLUGIN_API getParameterCount () SMTG_OVERRIDE
409  {
410  return _used_queue_count;
411  }
412 
413  Vst::IParamValueQueue* PLUGIN_API getParameterData (int32 index) SMTG_OVERRIDE;
414  Vst::IParamValueQueue* PLUGIN_API addParameterData (Vst::ParamID const& id, int32& index) SMTG_OVERRIDE;
415 
416 protected:
417  std::vector<Vst3ParamValueQueue> _queue;
418  int _used_queue_count;
419 };
420 
421 class LIBARDOUR_LOCAL Vst3EventList : public Vst::IEventList
422 {
423 public:
424  Vst3EventList ()
425  {
426  _events.reserve (128);
427  }
428 
429  QUERY_INTERFACE_IMPL (Vst::IEventList)
430 
431  uint32 PLUGIN_API addRef () SMTG_OVERRIDE
432  {
433  return 1;
434  }
435 
436  uint32 PLUGIN_API release () SMTG_OVERRIDE
437  {
438  return 1;
439  }
440 
441  int32 PLUGIN_API PLUGIN_API getEventCount () SMTG_OVERRIDE
442  {
443  return _events.size ();
444  }
445 
446  tresult PLUGIN_API getEvent (int32 index, Vst::Event& e) SMTG_OVERRIDE
447  {
448  if (index >= 0 && index < (int32)_events.size ()) {
449  e = _events[index];
450  return kResultTrue;
451  } else {
452  return kResultFalse;
453  }
454  }
455 
456  tresult PLUGIN_API addEvent (Vst::Event& e) SMTG_OVERRIDE
457  {
458  _events.push_back (e);
459  return kResultTrue;
460  }
461 
462  void clear ()
463  {
464  _events.clear ();
465  }
466 
467 protected:
468  std::vector<Vst::Event> _events;
469 };
470 
471 class LIBARDOUR_LOCAL RAMStream : public IBStream, public ISizeableStream, public Vst::IStreamAttributes
472 {
473 public:
474  RAMStream ();
475  RAMStream (uint8_t* data, size_t size);
476  RAMStream (std::string const& fn);
477 
478  virtual ~RAMStream ();
479 
480  tresult PLUGIN_API queryInterface (const TUID _iid, void** obj) SMTG_OVERRIDE;
481 
482  uint32 PLUGIN_API addRef () SMTG_OVERRIDE
483  {
484  return 1;
485  }
486 
487  uint32 PLUGIN_API release () SMTG_OVERRIDE
488  {
489  return 1;
490  }
491 
492  /* IBStream API */
493  tresult PLUGIN_API read (void* buffer, int32 numBytes, int32* numBytesRead) SMTG_OVERRIDE;
494  tresult PLUGIN_API write (void* buffer, int32 numBytes, int32* numBytesWritten) SMTG_OVERRIDE;
495  tresult PLUGIN_API seek (int64 pos, int32 mode, int64* result) SMTG_OVERRIDE;
496  tresult PLUGIN_API tell (int64* pos) SMTG_OVERRIDE;
497 
498  /* ISizeableStream API */
499  tresult PLUGIN_API getStreamSize (int64&) SMTG_OVERRIDE;
500  tresult PLUGIN_API setStreamSize (int64) SMTG_OVERRIDE;
501 
502  /* IStreamAttributes API */
503  tresult PLUGIN_API getFileName (Vst::String128 name) SMTG_OVERRIDE;
504  Vst::IAttributeList* PLUGIN_API getAttributes () SMTG_OVERRIDE;
505 
506  /* convenience API for state I/O */
507  void rewind ()
508  {
509  _pos = 0;
510  }
511 
512  bool readonly () const
513  {
514  return _readonly;
515  }
516 
517  bool write_int32 (int32 i);
518  bool write_int64 (int64 i);
519  bool write_ChunkID (const Vst::ChunkID& id);
520  bool write_TUID (const TUID& tuid);
521 
522  bool read_int32 (int32& i);
523  bool read_int64 (int64& i);
524  bool read_ChunkID (Vst::ChunkID& id);
525  bool read_TUID (TUID& tuid);
526 
527  /* direct access */
528  uint8_t const* data () const
529  {
530  return _data;
531  }
532 
533  int64 size () const
534  {
535  return _size;
536  }
537 
538 #ifndef NDEBUG
539  void hexdump (int64 max_len = 64) const;
540 #endif
541 
542 private:
543  bool reallocate_buffer (int64 size, bool exact);
544 
545  template <typename T>
546  bool read_pod (T& t)
547  {
548  int32 n_read = 0;
549  read ((void*)&t, sizeof (T), &n_read);
550  return n_read == sizeof (T);
551  }
552 
553  template <typename T>
554  bool write_pod (const T& t)
555  {
556  int32 written = 0;
557  write (const_cast<void*> ((const void*)&t), sizeof (T), &written);
558  return written == sizeof (T);
559  }
560 
561  uint8_t* _data;
562  int64 _size;
563  int64 _alloc;
564  int64 _pos;
565  bool _readonly;
566 
567  HostAttributeList attribute_list;
568 };
569 
570 class LIBARDOUR_LOCAL ROMStream : public IBStream
571 {
572 public:
573  ROMStream (IBStream& src, TSize offset, TSize size);
574  virtual ~ROMStream ();
575 
576  tresult PLUGIN_API queryInterface (const TUID _iid, void** obj) SMTG_OVERRIDE;
577 
578  uint32 PLUGIN_API addRef () SMTG_OVERRIDE
579  {
580  return 1;
581  }
582 
583  uint32 PLUGIN_API release () SMTG_OVERRIDE
584  {
585  return 1;
586  }
587 
588  /* IBStream API */
589  tresult PLUGIN_API read (void* buffer, int32 numBytes, int32* numBytesRead) SMTG_OVERRIDE;
590  tresult PLUGIN_API write (void* buffer, int32 numBytes, int32* numBytesWritten) SMTG_OVERRIDE;
591  tresult PLUGIN_API seek (int64 pos, int32 mode, int64* result) SMTG_OVERRIDE;
592  tresult PLUGIN_API tell (int64* pos) SMTG_OVERRIDE;
593 
594  void rewind ()
595  {
596  _pos = 0;
597  }
598 
599 protected:
600  IBStream& _stream;
601  int64 _offset;
602  int64 _size;
603  int64 _pos;
604 };
605 
606 #if defined(__clang__)
607 #pragma clang diagnostic pop
608 #elif __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6)
609 #pragma GCC diagnostic pop
610 #endif
611 
612 } // namespace Steinberg
613 #endif
IConnectionPoint * _src
Definition: vst3_host.h:251
~ConnectionProxy() SMTG_OVERRIDE
tresult PLUGIN_API notify(Vst::IMessage *) SMTG_OVERRIDE
IConnectionPoint * _dst
Definition: vst3_host.h:252
tresult PLUGIN_API disconnect(Vst::IConnectionPoint *) SMTG_OVERRIDE
uint32 PLUGIN_API release() SMTG_OVERRIDE
Definition: vst3_host.h:238
tresult PLUGIN_API connect(Vst::IConnectionPoint *) SMTG_OVERRIDE
ConnectionProxy(IConnectionPoint *src)
static HostApplication * theHostContext()
Definition: vst3_host.h:288
tresult PLUGIN_API queryInterface(const TUID _iid, void **obj) SMTG_OVERRIDE
tresult PLUGIN_API getContextInfoValue(int32 &, FIDString) SMTG_OVERRIDE
std::unique_ptr< PlugInterfaceSupport > _plug_interface_support
Definition: vst3_host.h:315
void set_session(ARDOUR::Session *)
uint32 PLUGIN_API addRef() SMTG_OVERRIDE
Definition: vst3_host.h:295
tresult PLUGIN_API createInstance(TUID cid, TUID _iid, void **obj) SMTG_OVERRIDE
static Vst::IHostApplication * getHostContext()
Definition: vst3_host.h:282
tresult PLUGIN_API getContextInfoString(Vst::TChar *, int32, FIDString) SMTG_OVERRIDE
tresult PLUGIN_API getName(Vst::String128 name) SMTG_OVERRIDE
uint32 PLUGIN_API release() SMTG_OVERRIDE
Definition: vst3_host.h:300
ARDOUR::Session * _session
Definition: vst3_host.h:318
tresult PLUGIN_API setBinary(AttrID aid, const void *data, uint32 size) SMTG_OVERRIDE
tresult PLUGIN_API getBinary(AttrID aid, const void *&data, uint32 &size) SMTG_OVERRIDE
std::map< std::string, HostAttribute * > list
Definition: vst3_host.h:195
uint32 PLUGIN_API release() SMTG_OVERRIDE
Definition: vst3_host.h:178
tresult PLUGIN_API setString(AttrID aid, const Vst::TChar *string) SMTG_OVERRIDE
tresult PLUGIN_API setInt(AttrID aid, int64 value) SMTG_OVERRIDE
uint32 PLUGIN_API addRef() SMTG_OVERRIDE
Definition: vst3_host.h:173
void removeAttrID(AttrID aid)
tresult PLUGIN_API getFloat(AttrID aid, double &value) SMTG_OVERRIDE
tresult PLUGIN_API setFloat(AttrID aid, double value) SMTG_OVERRIDE
tresult PLUGIN_API getInt(AttrID aid, int64 &value) SMTG_OVERRIDE
tresult PLUGIN_API getString(AttrID aid, Vst::TChar *string, uint32 size) SMTG_OVERRIDE
double floatValue() const
Definition: vst3_host.h:123
HostAttribute(const void *value, uint32 size)
Definition: vst3_host.h:106
Type getType() const
Definition: vst3_host.h:121
HostAttribute(int64 value)
Definition: vst3_host.h:83
int64 intValue() const
Definition: vst3_host.h:122
const Vst::TChar * stringValue(uint32 &stringSize)
Definition: vst3_host.h:125
const void * binaryValue(uint32 &binarySize)
Definition: vst3_host.h:131
HostAttribute(HostAttribute const &other)
HostAttribute(const Vst::TChar *value, uint32 size)
Definition: vst3_host.h:97
HostAttribute(double value)
Definition: vst3_host.h:90
uint32 PLUGIN_API release() SMTG_OVERRIDE
Definition: vst3_host.h:211
const char *PLUGIN_API getMessageID() SMTG_OVERRIDE
uint32 PLUGIN_API addRef() SMTG_OVERRIDE
Definition: vst3_host.h:206
uint32 PLUGIN_API addRef() SMTG_OVERRIDE
Definition: vst3_host.h:261
uint32 PLUGIN_API release() SMTG_OVERRIDE
Definition: vst3_host.h:266
void addPlugInterfaceSupported(const TUID)
std::vector< FUID > _interfaces
Definition: vst3_host.h:276
tresult PLUGIN_API isPlugInterfaceSupported(const TUID) SMTG_OVERRIDE
uint32 PLUGIN_API release() SMTG_OVERRIDE
virtual ~RefObject()
Definition: vst3_host.h:157
uint32 PLUGIN_API addRef() SMTG_OVERRIDE
GtkImageIconNameData name
Definition: gtkimage.h:6
#define LIBARDOUR_LOCAL
#define LIBARDOUR_API
union Value Value
static const int32 kClassIDSize
Definition: vst3_host.h:68
char ChunkID[4]
Definition: vst3_host.h:67
static const int32 kListOffsetPos
Definition: vst3_host.h:70
static const int32 kHeaderSize
Definition: vst3_host.h:69
Glib::ustring tchar_to_ustring(Vst::TChar const *s)
std::string tchar_to_utf8(Vst::TChar const *s)
bool utf8_to_tchar(Vst::TChar *rv, const char *s, size_t l=0)
Definition: lobject.h:100
#define QUERY_INTERFACE_IMPL(Interface)
Definition: vst3_host.h:34