
On Tue, Dec 22, 2015 at 06:51:47AM +0100, Clemens Ladisch wrote:
Ryan C. Underwood wrote:
Basically, the rawmidi virtual plugin enforces a 256-byte limit on events, and emits multiple events if e.g. a >256 byte sysex is encountered.
All sequencer clients have such a limit.
Clemens, could you please clarify what did you mean in this message: http://mailman.alsa-project.org/pipermail/alsa-devel/2015-March/088852.html Didn't you mean the limit is 4096?
Handling split messages cannot be avoided; the API is not capable of sending arbitrarily large messages.
We are having this problem with munt, and for munt the largest sysex it can parse, is AFAIK around 300 bytes. It doesn't need the arbitrary large messages, because they are illegal for it. It should better have them dropped entirely. IMHO it would be nice to have the default buffer size large anough to avoid the fragmentation for all practical cases, leaving the fragmentation capability only for the pathological/ theoretical cases. 4096 is enough for this. 1024 is enough. 256 is obviously not. So IMHO it would be nice to just enlarge the default and save people from the troubles they actually really do not need to take. I mean, even the 1-byte buffer will work, but is it sane? pipes etc have >=4096 bytes AFAIK, so it is obviously not a problem for kernel to allow just that. So the question is very simple: why not?