Page MenuHomeFreeBSD

The simplest OSS MIDI example
ClosedPublic

Authored by meka_tilda.center on Aug 14 2022, 1:12 AM.
Tags
None
Referenced Files
Unknown Object (File)
Fri, Dec 27, 11:22 PM
Unknown Object (File)
Sun, Dec 22, 1:08 AM
Unknown Object (File)
Wed, Dec 18, 6:49 PM
Unknown Object (File)
Thu, Dec 5, 3:29 AM
Unknown Object (File)
Nov 30 2024, 6:49 AM
Unknown Object (File)
Nov 23 2024, 8:53 AM
Unknown Object (File)
Nov 22 2024, 7:05 PM
Unknown Object (File)
Nov 22 2024, 3:16 PM
Subscribers

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Skipped
Unit
Tests Skipped

Event Timeline

share/examples/sound/midi.c
47

Make sure you wait for 0x80 MSB set.

if (!(raw & 0x80))
continue;
share/examples/sound/midi.c
72

All switch cases should have a "default:"

share/examples/sound/ossmidi.h
33

Use #define or enum here.

meka_tilda.center marked an inline comment as done.
meka_tilda.center marked 2 inline comments as done.
share/examples/sound/ossmidi.h
33

NOTE_MASK -> CMD_MASK

Looks good, though I might want to format the code w.r.t. style a bit more before commit? Who will submit this?

This revision is now accepted and ready to land.Aug 16 2022, 1:44 PM

To be honest I don't know how the process works. Can you advise, please?

As for formatting, this is the output that indent(1) produced. Can you tell me what would make it better?

To be honest I don't know how the process works. Can you advise, please?

I think it's just a matter of you saying how you want to be referred to in the author field of the git commit :) But I think it requires a "name <email>" format.

As for formatting, this is the output that indent(1) produced. Can you tell me what would make it better?

indent is a hack from the 70s, but it can be made to produce fairly style-complaint formatting if you use it with the profile that you can find under share/examples/indent/indent.pro.
Generally we apply rules from style(9) but we also apply the existing style from a file to new code in that file. Since the two don't always agree, we sometimes reformat existing code to be style(9)-compliant and then add the new code.

I think it's just a matter of you saying how you want to be referred to in the author field of the git commit :) But I think it requires a "name <email>" format.

I though "git format-patch" will do the right thing here. But anway "Goran Mekić <meka@tilda.center>" is prefered.

indent is a hack from the 70s, but it can be made to produce fairly style-complaint formatting if you use it with the profile that you can find under share/examples/indent/indent.pro.
Generally we apply rules from style(9) but we also apply the existing style from a file to new code in that file. Since the two don't always agree, we sometimes reformat existing code to be style(9)-compliant and then add the new code.

I didn't know there are differences between indent(1) and style(9). I am now using profile from examples and the following is the product of it. I see there's vim integration with style(9) so I'll try to incorporate it into my own config.

This revision now requires review to proceed.Aug 16 2022, 6:40 PM
This revision is now accepted and ready to land.Sep 27 2022, 5:22 PM