Assembly: Bass.Net (in Bass.Net.dll) Version: 18.104.22.168
[DllImportAttribute("bassasio")] public static float BASS_ASIO_ChannelGetLevel( bool input, int channel )
<DllImportAttribute("bassasio">] Public Shared Function BASS_ASIO_ChannelGetLevel ( input As Boolean, channel As Integer ) As Single
- Type: SystemBoolean
Dealing with an input channel? = an output channel.
- Type: SystemInt32
The input/output channel number... 0 = first.
Return ValueType: Single
If an error occurs, -1 is returned, use BASS_ASIO_ErrorGetCode to get the error code. If successful, the level of the channel is returned, ranging from 0 (silent) to 1 (max). If the channel's native sample format is floating-point, it is actually possible for the level to go above 1.
Volume settings made via BASS_ASIO_ChannelSetVolume(Boolean, Int32, Single) affect the level reading of output channels, but not input channels.
When an input channel is paused, it is still possible to get its level. Paused output channels will have a level of 0.
Level retrieval is not supported when the sample format is DSD.
|BASS_ERROR_INIT||BASS_ASIO_Init(Int32, BASSASIOInit) has not been successfully called.|
|BASS_ERROR_ILLPARAM||The input and channel combination is invalid.|
|BASS_ERROR_START||The device hasn't been started, or the channel isn't enabled.|
|BASS_ERROR_FORMAT||Level retrieval is not supported for the channel's sample format (please report).|
' get the linear level Dim level As Single = BassAsio.BASS_ASIO_ChannelSetVolume(False, 0) ' translate it to logarithmic dB Dim db As Double = 20.0 * Math.Log10(level)
// get the linear level float level = BassAsio.BASS_ASIO_ChannelSetVolume(false, 0); // translate it to logarithmic dB double db = 20.0 * Math.Log10(level);