Stream messages are arbitrary streams of bytes sent by the MidiShare driver without any processing.
![]()
Stream events have a variable number of fields.
Creates a Stream event from an array of shorts and returns a pointer to the event or NIL if there is no more memory space.
MidiEvPtr Stream ( long date, short len, short *p, short port)
{
MidiEvPtr e;
short c;
if ( e = MidiNewEv( typeStream ) ) /* Allocate a new event. Check not NIL */
{
Date(e) = date; /* These information are common to all */
Port(e) = port; /* kind of events */
c = len+1;
while (--c) MidiAddField(e,*p++);
if (MidiCountFields(e) < len ) /* if event smaller than len then*/
{
MidiFreeEv(e); /* we run out of memory, free it*/
e = nil; /* and return nil */
}
}
return e;
}