Retrieves the current position and value of an envelope on a channel.
Namespace: Un4seen.Bass.AddOn.Mix
Assembly: Bass.Net (in Bass.Net.dll) Version: 2.4.17.5
Syntax
[DllImportAttribute("bassmix")] public static long BASS_Mixer_ChannelGetEnvelopePos( int handle, BASSMIXEnvelope type, ref float value )
Parameters
- handle
- Type: SystemInt32
The mixer source channel handle (which was add via BASS_Mixer_StreamAddChannel(Int32, Int32, BASSFlag) or BASS_Mixer_StreamAddChannelEx(Int32, Int32, BASSFlag, Int64, Int64)) beforehand). - type
- Type: Un4seen.Bass.AddOn.MixBASSMIXEnvelope
The envelope to get the position/value of. One of the following (see BASSMIXEnvelope):BASS_MIXER_ENV_FREQ Sample rate. BASS_MIXER_ENV_VOL Volume. BASS_MIXER_ENV_PAN Panning/balance. - value
- Type: SystemSingle
A reference to a variable to receive the envelope value at the current position.
Return Value
Type: Int64If successful, the current position of the envelope is returned, else -1 is returned. Use BASS_ErrorGetCode to get the error code.
Remarks
The envelope's current position is not necessarily what is currently being heard, due to buffering.
ERROR CODE | Description |
---|---|
BASS_ERROR_HANDLE | handle is not plugged into a mixer. |
BASS_ERROR_ILLTYPE | type is not valid. |
BASS_ERROR_NOTAVAIL | There is no envelope of the requested type on the channel. |
Examples
float val = 0f; int pos = BassMix.BASS_Mixer_ChannelGetEnvelope(source, BASSMIXEnvelope.BASS_MIXER_ENV_VOL, ref val); Console.WriteLine("Pos={0}, Val={1}", pos, val);
See Also