BASS_ATTRIB_MIXER_LATENCY attribute
Custom output latency.
BASS_ChannelSetAttribute(
HSTREAM handle,
BASS_ATTRIB_MIXER_LATENCY,
float latency
);
Parameters
| handle | The mixer stream handle.
|
| latency | The 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. This attribute can be used to tell them what the output latency is when the mixer is not being played by BASS. If the latency varies then it is generally better to use a MIXERLATENCYPROC callback function via BASS_Mixer_StreamSetLatency instead of this attribute.
The output latency also affects the timing of non-mixtime sync callbacks set via BASS_Mixer_ChannelSetSync. This attribute's value when the sync is triggered will be used.
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_StreamSetLatency
BASS_ChannelGetAttribute, BASS_ChannelSetAttribute