Move TChar* -> std::u16string conversion to base.h

We're going to need it for VST3 events.
This commit is contained in:
Robbert van der Helm
2020-12-15 17:01:57 +01:00
parent ce09d60447
commit 6fc54d80fb
3 changed files with 18 additions and 7 deletions
+7
View File
@@ -23,6 +23,7 @@
#include <pluginterfaces/base/ftypes.h>
#include <pluginterfaces/base/funknown.h>
#include <pluginterfaces/base/ibstream.h>
#include <pluginterfaces/vst/vsttypes.h>
// Yet Another layer of includes, but these are some VST3-specific typedefs that
// we'll need for all of our interfaces
@@ -51,6 +52,12 @@ constexpr size_t max_num_speakers = 16384;
*/
constexpr size_t max_vector_stream_size = 50 << 20;
/**
* Convert a UTF-16 C-style string to an `std::u16string`. Who event invented
* UTF-16?
*/
std::u16string tchar_string_to_u16string(const Steinberg::Vst::TChar* string);
/**
* Empty struct for when we have send a response to some operation without any
* result values.