Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix ALSA event encoding #14

Merged
merged 1 commit into from
Mar 26, 2023
Merged

Fix ALSA event encoding #14

merged 1 commit into from
Mar 26, 2023

Conversation

pbarada
Copy link
Contributor

@pbarada pbarada commented Mar 26, 2023

snd_midi_event_encode encoes only first MIDI message. Instead, keep pumping snd_midi_event_encode_byte and when it indicates a fully-formed ALSA sequencer event seen, output it, and if any events output after processing all bytes in the buffer, then drain the output.
Still need to better understand whether need snd_midi_event_reset_encode call is necessary.

snd_midi_event_encode encoes only first MIDI message. Instead,
keep pumping snd_midi_event_encode_byte and when it indicates a
fully-formed ALSA sequencer event seen, output it, and if any
events output after processing all bytes in the buffer, then drain
the output.
Still need to better understand whether need snd_midi_event_reset_encode
call is necessary.
@pbarada pbarada requested a review from nosuchtim March 26, 2023 15:19
@nosuchtim nosuchtim merged commit 9fd8c71 into master Mar 26, 2023
@pbarada pbarada deleted the alsa-encode-midi branch April 5, 2023 15:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants