[sdiy] MIDI bytestream parser
Neil Johnson
neil.johnson97 at ntlworld.com
Wed Nov 17 00:18:52 CET 2010
Hi Olivier,
> When I mean user I really mean "user of the library". It looks like
> Neil's library exposes to the user of the library the channel numbers
> as 1-16. Just look here:
> http://code.google.com/p/miby/source/browse/trunk/src/miby.c#148
Yes indeed!
> Switch statements are likely to generate heavier code, because some
> compilers are unable to optimize them properly as jump tables - and
> they end up being compiled as a bunch of comparison / jump.
Even good compilers sometimes do poorly with switch statements. And
the quality of the generated code also depends on the underlaying
instruction set support for jump tables.
> Given that
> this kind of code could very well be embedded on platforms with 2 or
> 4k of code memory with lousy compilers, this is a sane thing to do.
Thanks!
Neil
--
http://www.njohnson.co.uk
More information about the Synth-diy
mailing list