BASS_Mixer_ChannelSetEnvelopePos


Sets the current position of an envelope on a 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_HANDLEThe channel is not plugged into a mixer.
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. To reduce the delay, use the BASS_CONFIG_BUFFER config option config option to reduce the buffer length.

See also

BASS_Mixer_ChannelGetEnvelopePos, BASS_Mixer_ChannelSetEnvelope