BASS_Mixer_ChannelGetEnvelopePos

Retrieves the current position and value of an envelope on a mixer source channel.

QWORD BASS_Mixer_ChannelGetEnvelopePos(
    DWORD handle,
    DWORD type,
    float *value
);

Parameters

handleThe channel handle.
typeThe envelope to get the position/value of. One of the following.
BASS_MIXER_ENV_FREQSample rate.
BASS_MIXER_ENV_VOLVolume.
BASS_MIXER_ENV_PANPanning/balance.
valuePointer to a variable to receive the envelope value at the current position... NULL = do not retrieve it.

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 envelope's current position is not necessarily what is currently being heard, due to buffering.

See also

BASS_Mixer_ChannelSetEnvelope, BASS_Mixer_ChannelSetEnvelopePos