working on win32 uwp! and libremidi update
This commit is contained in:
@@ -31,7 +31,7 @@ struct client_configuration
|
||||
best to set the error callback function before opening a port.
|
||||
*/
|
||||
midi_error_callback on_error{};
|
||||
midi_error_callback on_warning{};
|
||||
midi_warning_callback on_warning{};
|
||||
|
||||
//! Poll period for observation polling operations, if relevant to the backend
|
||||
std::chrono::milliseconds poll_period{100};
|
||||
@@ -115,9 +115,9 @@ public:
|
||||
port,
|
||||
input_configuration{
|
||||
.on_message
|
||||
= [this, port](libremidi::message&& m) {
|
||||
configuration.on_message(port, std::move(m));
|
||||
},
|
||||
= [this,
|
||||
port](libremidi::message&& m) { configuration.on_message(port, std::move(m)); },
|
||||
.on_raw_data = {},
|
||||
.get_timestamp = {},
|
||||
|
||||
.on_error = configuration.on_error,
|
||||
@@ -153,32 +153,40 @@ public:
|
||||
void remove_input(const input_port& port) { m_inputs.erase(port); }
|
||||
void remove_output(const output_port& port) { m_outputs.erase(port); }
|
||||
|
||||
void send_message(const unsigned char* message, size_t size)
|
||||
stdx::error send_message(const unsigned char* message, size_t size)
|
||||
{
|
||||
for (auto& [_, out] : m_outputs)
|
||||
{
|
||||
out.send_message(message, size);
|
||||
if (auto err = out.send_message(message, size); err != stdx::error{})
|
||||
return err;
|
||||
}
|
||||
return stdx::error{};
|
||||
}
|
||||
|
||||
void send_ump(const uint32_t* message, size_t size)
|
||||
stdx::error send_ump(const uint32_t* message, size_t size)
|
||||
{
|
||||
for (auto& [_, out] : m_outputs)
|
||||
{
|
||||
out.send_ump(message, size);
|
||||
if (auto err = out.send_ump(message, size); err != stdx::error{})
|
||||
return err;
|
||||
}
|
||||
return stdx::error{};
|
||||
}
|
||||
|
||||
void send_message(const output_port& port, const unsigned char* message, size_t size)
|
||||
stdx::error send_message(const output_port& port, const unsigned char* message, size_t size)
|
||||
{
|
||||
if (auto it = m_outputs.find(port); it != m_outputs.end())
|
||||
it->second.send_message(message, size);
|
||||
return it->second.send_message(message, size);
|
||||
|
||||
return stdx::error{};
|
||||
}
|
||||
|
||||
void send_ump(const output_port& port, const uint32_t* message, size_t size)
|
||||
stdx::error send_ump(const output_port& port, const uint32_t* message, size_t size)
|
||||
{
|
||||
if (auto it = m_outputs.find(port); it != m_outputs.end())
|
||||
it->second.send_ump(message, size);
|
||||
return it->second.send_ump(message, size);
|
||||
|
||||
return stdx::error{};
|
||||
}
|
||||
|
||||
private:
|
||||
|
||||
Reference in New Issue
Block a user