Skip to content

Commit

Permalink
[ci] Fix windows u16 issue
Browse files Browse the repository at this point in the history
  • Loading branch information
jcelerier committed Jul 6, 2024
1 parent 10243f4 commit c9124bf
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 18 deletions.
2 changes: 1 addition & 1 deletion cmake/avendish.dependencies.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ if(NOT TARGET fmt::fmt)
FetchContent_Declare(
fmt
GIT_REPOSITORY "https://github.com/fmtlib/fmt"
GIT_TAG 10.1.1
GIT_TAG 11.0.1
GIT_PROGRESS true
)
FetchContent_MakeAvailable(fmt)
Expand Down
28 changes: 14 additions & 14 deletions include/avnd/binding/vst3/bus_info.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ struct event_bus_info
info.mediaType = MediaTypes::kEvent;
info.direction = BusDirections::kInput;
info.channelCount = 1;
setStr(info.name, u16 "Event in");
setStr(info.name, u16_str "Event in");
info.busType = BusTypes::kMain;
info.flags = BusInfo::kDefaultActive;

Expand All @@ -60,7 +60,7 @@ struct event_bus_info
info.mediaType = MediaTypes::kEvent;
info.direction = BusDirections::kOutput;
info.channelCount = 1;
setStr(info.name, u16 "Event Out");
setStr(info.name, u16_str "Event Out");
info.busType = BusTypes::kMain;
info.flags = BusInfo::kDefaultActive;

Expand Down Expand Up @@ -235,7 +235,7 @@ struct audio_bus_info<T>
if(index == 0)
{
info.channelCount = avnd::input_channels<T>(2);
setStr(info.name, u16 "Stereo In");
setStr(info.name, u16_str "Stereo In");
info.busType = Steinberg::Vst::BusTypes::kMain;

return Steinberg::kResultTrue;
Expand All @@ -250,7 +250,7 @@ struct audio_bus_info<T>
if(index == 0)
{
info.channelCount = avnd::output_channels<T>(2);
setStr(info.name, u16 "Stereo Out");
setStr(info.name, u16_str "Stereo Out");
info.busType = Steinberg::Vst::BusTypes::kMain;

return Steinberg::kResultTrue;
Expand Down Expand Up @@ -339,7 +339,7 @@ struct audio_bus_info<T>
if(index == 0)
{
info.channelCount = avnd::input_channels<T>(2);
setStr(info.name, u16 "Mono In");
setStr(info.name, u16_str "Mono In");
info.busType = Steinberg::Vst::BusTypes::kMain;

return Steinberg::kResultTrue;
Expand All @@ -354,7 +354,7 @@ struct audio_bus_info<T>
if(index == 0)
{
info.channelCount = avnd::output_channels<T>(2);
setStr(info.name, u16 "Mono Out");
setStr(info.name, u16_str "Mono Out");
info.busType = Steinberg::Vst::BusTypes::kMain;

return Steinberg::kResultTrue;
Expand Down Expand Up @@ -443,7 +443,7 @@ struct audio_bus_info<T>
if(index == 0)
{
info.channelCount = avnd::input_channels<T>(2);
setStr(info.name, u16 "Mono In");
setStr(info.name, u16_str "Mono In");
info.busType = Steinberg::Vst::BusTypes::kMain;

return Steinberg::kResultTrue;
Expand All @@ -458,7 +458,7 @@ struct audio_bus_info<T>
if(index == 0)
{
info.channelCount = avnd::output_channels<T>(2);
setStr(info.name, u16 "Mono Out");
setStr(info.name, u16_str "Mono Out");
info.busType = Steinberg::Vst::BusTypes::kMain;

return Steinberg::kResultTrue;
Expand Down Expand Up @@ -549,7 +549,7 @@ struct audio_bus_info<T>
if(index < input_refl::size)
{
info.channelCount = 2;
setStr(info.name, u16 "Stereo In");
setStr(info.name, u16_str "Stereo In");
info.busType = Steinberg::Vst::BusTypes::kMain;

return Steinberg::kResultTrue;
Expand All @@ -564,7 +564,7 @@ struct audio_bus_info<T>
if(index < output_refl::size)
{
info.channelCount = 2;
setStr(info.name, u16 "Stereo Out");
setStr(info.name, u16_str "Stereo Out");
info.busType = Steinberg::Vst::BusTypes::kMain;

return Steinberg::kResultTrue;
Expand Down Expand Up @@ -661,7 +661,7 @@ struct audio_bus_info<T>
if(index < inputCount())
{
info.channelCount = 1;
setStr(info.name, u16 "Main In");
setStr(info.name, u16_str "Main In");
info.busType = Steinberg::Vst::BusTypes::kMain;

return Steinberg::kResultTrue;
Expand All @@ -676,7 +676,7 @@ struct audio_bus_info<T>
if(index < outputCount())
{
info.channelCount = 1;
setStr(info.name, u16 "Main Out");
setStr(info.name, u16_str "Main Out");
info.busType = Steinberg::Vst::BusTypes::kMain;

return Steinberg::kResultTrue;
Expand Down Expand Up @@ -764,7 +764,7 @@ struct audio_bus_info<T>
if(index < inputCount())
{
info.channelCount = 1;
setStr(info.name, u16 "Main In");
setStr(info.name, u16_str "Main In");
info.busType = Steinberg::Vst::BusTypes::kMain;

return Steinberg::kResultTrue;
Expand All @@ -779,7 +779,7 @@ struct audio_bus_info<T>
if(index < outputCount())
{
info.channelCount = 1;
setStr(info.name, u16 "Main Out");
setStr(info.name, u16_str "Main Out");
info.busType = Steinberg::Vst::BusTypes::kMain;

return Steinberg::kResultTrue;
Expand Down
4 changes: 2 additions & 2 deletions include/avnd/binding/vst3/helpers.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,15 @@
namespace stv3
{
#if defined(_WIN32)
#define u16 L""
#define u16_str L""
template <std::size_t M>
auto setStr(TChar (&field)[M], std::wstring_view text)
{
std::copy_n(text.data(), text.size(), field);
field[text.size()] = 0;
}
#else
#define u16 u""
#define u16_str u""
template <std::size_t M>
auto setStr(TChar (&field)[M], std::u16string_view text)
{
Expand Down
2 changes: 1 addition & 1 deletion include/avnd/binding/vst3/programs.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ class UnitInfo : public Steinberg::Vst::IUnitInfo
{
info.id = 1;
info.parentUnitId = Steinberg::Vst::kRootUnitId;
setStr(info.name, u16 "Unit1");
setStr(info.name, u16_str "Unit1");
info.programListId = Steinberg::Vst::kNoProgramListId;
return Steinberg::kResultTrue;
}
Expand Down

0 comments on commit c9124bf

Please sign in to comment.