MCPcopy Create free account
hub / github.com/celtera/libremidi / process

Method process

bindings/python/pylibremidi.cpp:111–124  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

109 explicit midi_in_poll_wrapper(ump_input_configuration_wrapper conf, input_api_configuration api_conf) : python_ump_callbacks{conf}, impl{this->process(std::move(conf)), std::move(api_conf)} {}
110
111 input_configuration process(input_configuration_wrapper obs) {
112 python_midi1_callbacks = obs;
113
114 if (obs.on_error)
115 obs.on_error = [this](std::string_view errorText, const source_location &) { queue.enqueue(poll_queue::error_message{std::string{errorText}}); };
116 if (obs.on_warning)
117 obs.on_warning = [this](std::string_view errorText, const source_location &) { queue.enqueue(poll_queue::warning_message{std::string{errorText}}); };
118
119 if (obs.on_message)
120 obs.on_message = [this](libremidi::message &&msg) { queue.enqueue(std::move(msg)); };
121 if (obs.on_raw_data_vector)
122 obs.on_raw_data = [this](std::span<const uint8_t> msg, timestamp t) { queue.enqueue(poll_queue::midi1_raw_message{{msg.begin(), msg.end()}, t}); };
123 return obs;
124 }
125
126 ump_input_configuration process(ump_input_configuration_wrapper obs) {
127 python_ump_callbacks = obs;

Callers 1

midi_in_poll_wrapperMethod · 0.95

Calls 2

beginMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected