BASS_ATTRIB_MIXER_LATENCY attribute


Custom output latency.

BASS_ChannelSetAttribute(
    HSTREAM handle,
    BASS_ATTRIB_MIXER_LATENCY,
    float latency
);

Parameters

handleThe mixer stream handle.
latencyThe latency in seconds.

Remarks

When a mixer is played by BASS, the BASS_Mixer_ChannelGetData, BASS_Mixer_ChannelGetLevel, BASS_Mixer_ChannelGetLevelEx, and BASS_Mixer_ChannelGetPosition functions will get the output latency and account for that so that they reflect what is currently being heard, but that cannot be done when a different output system is used, eg. ASIO or WASAPI. In that case, this attribute can be used to tell the mixer what the output latency is, so that those functions can still account for it. The mixer needs to have the BASS_STREAM_DECODE and BASS_MIXER_POSEX flags set to use this attribute.

The default setting is 0 (no accounting for latency). Changes take immediate effect.

See also

BASS_Mixer_ChannelGetData, BASS_Mixer_ChannelGetLevel, BASS_Mixer_ChannelGetLevelEx, BASS_Mixer_ChannelGetPosition

BASS_ChannelGetAttribute, BASS_ChannelSetAttribute