|
||||||||||||
DxMidi - Setting buffers | ||||||||||||
|
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
size is the number of bytes reserved
NOTE : theses functions are control driven.
|