BASS_Mixer_ChannelSetEnvelopePos

Sets the current position of an envelope on a mixer source channel.

BOOL BASS_Mixer_ChannelSetEnvelopePos(
    DWORD handle,
    DWORD type,
    QWORD pos
);

Parameters

handleThe channel handle.
typeThe envelope to set the position of. One of the following.
BASS_MIXER_ENV_FREQSample rate.
BASS_MIXER_ENV_VOLVolume.
BASS_MIXER_ENV_PANPanning/balance.
posThe new envelope position, in bytes. If this is beyond the end of the envelope it will be capped or looped, depending on whether the envelope has looping enabled.

Return value

If successful, the current position of the envelope is returned, else -1 is returned. Use BASS_ErrorGetCode to get the error code.

Error codes

BASS_ERROR_HANDLEhandle is not a mixer source.
BASS_ERROR_ILLTYPEtype is not valid.
BASS_ERROR_NOTAVAILThere is no envelope of the requested type on the channel.

Remarks

During playback, the effect of changes are not heard instantaneously, due to buffering. This latency can be reduced via the BASS_ATTRIB_BUFFER attribute.

See also

BASS_Mixer_ChannelGetEnvelopePos, BASS_Mixer_ChannelSetEnvelope