Retrieves the level (peak amplitude) of a sample, stream, MOD music or recording channel.
Assembly: Bass.Net (in Bass.Net.dll) Version: 22.214.171.124
public static float BASS_ChannelGetLevels( int handle, float length = 0,02f, BASSLevel flags = BASSLevel.BASS_LEVEL_ALL )
Public Shared Function BASS_ChannelGetLevels ( handle As Integer, Optional length As Single = 0,02F, Optional flags As BASSLevel = BASSLevel.BASS_LEVEL_ALL ) As Single()
- Type: SystemInt32
The channel handle... a HCHANNEL, HMUSIC, HSTREAM, or HRECORD.
- length (Optional)
- Type: SystemSingle
How much data (in seconds) to look at to get the level (limited to 1 second).
- flags (Optional)
- Type: Un4seen.BassBASSLevel
What levels to retrieve. One of the following (see BASSLevel):
BASS_LEVEL_ALL Retrieves a separate level for each channel. BASS_LEVEL_MONO Retrieve a single mono level. BASS_LEVEL_STEREO Get a stereo level. The left level will be from the even channels, and the right level will be from the odd channels. If there are an odd number of channels then the left and right levels will both include all channels. BASS_LEVEL_RMS Flag: Get the RMS level. Otherwise the peak level. BASS_LEVEL_VOLPAN Apply the current BASS_ATTRIB_VOL and BASS_ATTRIB_PAN values to the level reading.
Return ValueType: Single
On success the array of levels is returned - else is returned, use BASS_ErrorGetCode to get the error code.
|BASS_ERROR_HANDLE||handle is not a valid channel.|
|BASS_ERROR_NOPLAY||The channel is not playing.|
|BASS_ERROR_ENDED||The decoding channel has reached the end.|
|BASS_ERROR_BUFLOST||Should not happen... check that a valid window handle was used with.|