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

BOOL BASS_Mixer_ChannelSetEnvelopePos(
    DWORD handle,
    DWORD type,
    QWORD pos


handleThe channel handle.
typeThe envelope to set the position of. One of the following.
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.


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