Because the transfert of Midi events in RealBasic is not
fast enough to guarantee all datas transmission, DxMidi manages two buffers.
One for the notes (and Sysex too in standard mode), and one another
for special SysEx purposes.
This second buffer expects a particular system message to occur in the
DxMidi driver and then put all the datas in the Sysex buffer to protect
datas from any timeout troubleshooting.
By setting the Notes buffer, you can enlarge the default size of 4000
bytes to every value according to the available memory in the Macintosh
(let the user decides for the buffer size himself if you want more configuration
settings).
The SysexBuffer is 4000 bytes by default, but to contains large sysex,
you can enlarge his size to a size larger than the expected sysex.
You can specify the size of the buffers at every moment, enlarge them,
reduce them, and also set the 0 value (but you will dont receive
datas anymore !).
result = me.SetBufferNotes(
size )
size as integer
result as integer
This sets the new value of the notes buffer.
Result returns (-1) if the reservation failed (try to reserve a smaller
size). Default value is 4000. Dont try to specify a too large value
(>1Mo).
size is the number
of bytes reserved
The result code contains 0 if
the connection is made, or a standard DxMidi result
code for error.
result = me.SetBufferSysex(
size )
size as integer
result as integer
This sets the new value of the notes buffer. Result gives you (-1) if
the reservation failed (try to reserve a smaller size). Default value
is 4000. Dont try to specify a too large value (>1Mo).
size is the number
of bytes reserved
The result code contains 0 if
the connection is made, or a standard DxMidi result
code for error.
NOTE : theses functions are control
driven.
Place a DxMidi control first on your window to set the buffers.
|