- /* TODO: don't skip these */
- stream_Read (s, NULL, 1); /* Manuf ID */
- for (;;)
- {
- uint8_t c;
- if (stream_Read (s, &c, 1) != 1)
- return -1;
- if (c == 0xF7)
- goto skip;
- }
- /* never reached */
+ /* Variable length followed by SysEx event data */
+ int32_t len = ReadVarInt (s);
+ if (len == -1)
+ return -1;
+
+ block = stream_Block (s, len);
+ if (block == NULL)
+ return -1;
+ block = block_Realloc (block, 1, len);
+ if (block == NULL)
+ return -1;
+ block->p_buffer[0] = event;
+ goto send;