Fix C++ MIDI-CI profile parsing in PROFILE_INQUIRY_REPLY #30
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fix C++ MIDI-CI Profile Parsing in PROFILE_INQUIRY_REPLY
Fixes the issue where
PROFILE_INQUIRY_REPLYmessages created empty profile vectors instead of parsing the actual profile data from the sysex message, implementing the C++ equivalent of Kotlin'sCIRetrieval.midiCIGetProfileSet()functionality.Problem
The C++ implementation in
Messenger::process_input()was creating emptystd::vector<std::vector<uint8_t>>for both enabled and disabled profiles when processingPROFILE_INQUIRY_REPLYmessages, instead of parsing the actual profile data from the sysex bytes. This prevented proper profile inspection message processing.Solution
Changes Made:
PROFILE_INQUIRY_REPLYcase inMessenger::process_input()to extract profile data from bytes 13+ of the sysex messageProfileReply::deserialize()method for proper parsing of enabled and disabled profilesPROPERTY_SUBSCRIPTION_REPLYto properly extract body data from the messageImplementation Details:
ProfileReply::deserialize()method which correctly implements the parsing logic that matches the Kotlin referenceTesting
CIRetrieval.midiCIGetProfileSet()implementationVerification
The fix ensures that profile data is properly extracted and parsed from MIDI-CI messages, enabling correct profile inspection and further profile-related message processing that was previously broken due to empty profile vectors.
Link to Devin run: https://app.devin.ai/sessions/e63842341c21412c86cc2f8a5a694d2f
Requested by: Atsushi Eno (atsushieno@gmail.com)