The maximum percentage of CPU time that a MIDI stream can use.

    HSTREAM handle,
    float limit


handleThe MIDI stream handle.
limitThe CPU usage limit... 0 = automatic, over 100 = limit waiting for samples to load but do not kill voices.


It is not strictly the CPU usage that is measured, but rather how timely the stream is able to render data. For example, a limit of 50% would mean that the rendering would need to be at least 2x real-time speed. When the limit is exceeded (unless the limit is over 100), BASSMIDI will begin killing voices, starting with the most quiet.

When the CPU usage is limited, BASSMIDI will also limit how long it waits for samples to load. If the required amount of data cannot be loaded in time then a sample will be silenced until it is available and the stream will continue playing other samples as normal in the meantime.

The default value is 0 (automatic), which means the stream's CPU usage will be limited to 100% when it is processed in an update thread (eg. during playback) and will otherwise be unlimited (wait for samples indefinitely and no voice killing).

See also


BASS_ChannelGetAttribute, BASS_ChannelSetAttribute