Skip to content

Commit

Permalink
[ci] Multiple build fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
jcelerier committed Apr 3, 2024
1 parent 3672841 commit 73fdc57
Show file tree
Hide file tree
Showing 4 changed files with 40 additions and 16 deletions.
5 changes: 5 additions & 0 deletions src/ossia/detail/config.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
#define OSSIA_EXTERN_EXPORT_HPP(EXPORT) EXPORT
#define OSSIA_EXTERN_EXPORT_CPP(EXPORT)

#undef OSSIA_DEPRECATED
#if defined(__clang__) || defined(_MSC_VER) || (defined(__GNUC__) && (__GNUC__ >= 13))
#define OSSIA_DEPRECATED(REASON) [[deprecated(REASON)]]
#else
Expand Down Expand Up @@ -103,6 +104,10 @@
#define BOOST_SYSTEM_NO_DEPRECATED 1
#define BOOST_LEXICAL_CAST_ASSUME_C_LOCALE 1

// Disable parallel stl as otherwise
// we need to link against TBB on GCC Linux...
#define BOOST_UNORDERED_DISABLE_PARALLEL_ALGORITHMS 1

#if !defined(BOOST_REGEX_NO_LIB)
#define BOOST_REGEX_NO_LIB 1
#endif
Expand Down
1 change: 1 addition & 0 deletions src/ossia/editor/scenario/time_event.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
#include <ossia/editor/scenario/time_value.hpp>

#include <cstdint>
#include <functional>
#include <memory>

/**
Expand Down
9 changes: 0 additions & 9 deletions src/ossia/protocols/midi/midi_protocol.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -34,15 +34,6 @@ midi_protocol::midi_protocol(
m_output = std::make_unique<libremidi::midi_out>(conf, api);
}

/*
midi_protocol::midi_protocol(
ossia::net::network_context_ptr ctx, midi_info m, libremidi::API api)
: midi_protocol{std::move(ctx), m.handle.display_name, api}
{
set_info(m);
}
*/

midi_protocol::~midi_protocol()
{
if(m_input)
Expand Down
41 changes: 34 additions & 7 deletions tests/Network/MIDITest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,27 +3,54 @@

#include "ProtocolTestUtils.hpp"
#include "TestUtils.hpp"
#include "include_catch.hpp"

#include <ossia/detail/config.hpp>

#include "include_catch.hpp"

#include <libremidi/libremidi.hpp>
#if defined(OSSIA_PROTOCOL_MIDI)
#include <ossia/protocols/midi/midi.hpp>
#endif

#ifdef OSSIA_PROTOCOL_MIDI
#if 1
//#ifdef OSSIA_PROTOCOL_MIDI
TEST_CASE("test_midi", "test_midi")
{
using namespace ossia::net::midi;
try
{
auto ctx = ossia::net::create_network_context();
for(auto e : midi_protocol::scan())
for(auto midi_api : libremidi::available_apis())
{
ossia::net::midi::midi_device dev(std::make_unique<midi_protocol>(ctx, e));
dev.set_name("dada");
dev.create_full_tree();
libremidi::observer_configuration conf;
libremidi::observer obs{conf, libremidi::observer_configuration_for(midi_api)};

for(auto port : obs.get_input_ports())
{
libremidi::input_configuration conf;
auto api_conf = libremidi::midi_in_configuration_for(midi_api);

auto proto
= std::make_unique<midi_protocol>(ctx, port.display_name, conf, api_conf);
proto->set_info(midi_info{midi_info::Type::Input, port, false});

midi_device dev(std::move(proto));
dev.set_name("test");
dev.create_full_tree();
}
for(auto port : obs.get_output_ports())
{
libremidi::input_configuration conf;
auto api_conf = libremidi::midi_in_configuration_for(midi_api);

auto proto
= std::make_unique<midi_protocol>(ctx, port.display_name, conf, api_conf);
proto->set_info(midi_info{midi_info::Type::Input, port, false});

midi_device dev(std::move(proto));
dev.set_name("test");
dev.create_full_tree();
}
}
}
catch(...)
Expand Down

0 comments on commit 73fdc57

Please sign in to comment.