BASS_ATTRIB_MIDI_QUEUE_ASYNC attribute

The size of a MIDI stream's async event queue.

BASS_ChannelSetAttribute(
    HSTREAM handle,
    BASS_ATTRIB_MIDI_QUEUE_ASYNC,
    float size
);

Parameters

handleThe MIDI stream handle.
sizeThe size of the queue in events. If this is below the number of events currently queued then it will be raised to that.

Remarks

This attribute is the size of buffer used to hold events that are waiting to be played in the next update cycle, having been queued asynchronously via BASS_MIDI_StreamEvent or BASS_MIDI_StreamEvents. It will grow automatically when needed, but if you know that you will have a large number of queued events then this attribute can be used to preallocate a suitably large buffer to avoid reallocations during playback. The buffer can also be shrunk, but not below the number of events currently queued in it.

See also

BASS_MIDI_StreamEvents, BASS_ATTRIB_MIDI_QUEUE_BYTE, BASS_ATTRIB_MIDI_QUEUE_TICK

BASS_ChannelGetAttribute, BASS_ChannelSetAttribute