mirror of
https://github.com/robbert-vdh/yabridge.git
synced 2026-05-09 20:29:10 +02:00
Return a 0 for skipped events
Not that any events get skipped at the moment.
This commit is contained in:
+4
-7
@@ -35,11 +35,7 @@ class DefaultDataConverter {
|
|||||||
* Read data from the `data` void pointer into a an `EventPayload` value
|
* Read data from the `data` void pointer into a an `EventPayload` value
|
||||||
* that can be serialized and conveys the meaning of the event.
|
* that can be serialized and conveys the meaning of the event.
|
||||||
*
|
*
|
||||||
* If this returns a nullopt, then the event won't be performed at all. Some
|
* If this returns a nullopt, then the event will be skipped.
|
||||||
* plugins perform `audioMasterUpdateDisplay` host callbacks and apparently
|
|
||||||
* some hosts just outright crash when they receive these functions, so they
|
|
||||||
* have to be filtered out. Please let me know if there's some way to detect
|
|
||||||
* whether the host supports these callbacks before sending them!
|
|
||||||
*/
|
*/
|
||||||
virtual std::optional<EventPayload> read(const int /*opcode*/,
|
virtual std::optional<EventPayload> read(const int /*opcode*/,
|
||||||
const int /*index*/,
|
const int /*index*/,
|
||||||
@@ -135,8 +131,9 @@ intptr_t send_event(boost::asio::local::stream_protocol::socket& socket,
|
|||||||
const std::optional<EventPayload> payload =
|
const std::optional<EventPayload> payload =
|
||||||
data_converter.read(opcode, index, value, data);
|
data_converter.read(opcode, index, value, data);
|
||||||
if (!payload.has_value()) {
|
if (!payload.has_value()) {
|
||||||
// A 1 usually means that the event was processed succesfully
|
// A 0 usually means that the event was not supported by the other
|
||||||
return 1;
|
// rendpoint
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (logging.has_value()) {
|
if (logging.has_value()) {
|
||||||
|
|||||||
Reference in New Issue
Block a user