Retrieves the level of the current Wasapi device/driver (endpoint).
Namespace: Un4seen.BassWasapi
Assembly: Bass.Net (in Bass.Net.dll) Version: 2.4.17.5
Syntax
[DllImportAttribute("basswasapi", EntryPoint = "BASS_WASAPI_GetLevelEx")] public static bool BASS_WASAPI_GetLevel( float[] levels, float length, BASSLevel flags )
Parameters
- levels
- Type: SystemSingle
The array in which the levels are to be returned. - length
- Type: SystemSingle
The amount of data to inspect to calculate the level, in seconds. The maximum is 1 second. Less data than requested may be used if the full amount is not available, eg. if the device's buffer is shorter. - flags
- 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.
Return Value
Type: BooleanOn success is returned - else , use BASS_ErrorGetCode to get the error code.
If successful, the requested levels are returned in the levels array.
Remarks
ERROR CODE | Description |
---|---|
BASS_ERROR_INIT | BASS_WASAPI_Init(Int32, Int32, Int32, BASSWASAPIInit, Single, Single, WASAPIPROC, IntPtr) has not been successfully called. |
BASS_ERROR_NOTAVAIL | The BASS_WASAPI_BUFFER flag was not specified in the device's initialization. |
BASS_ERROR_ILLPARAM | length is not valid. |
See Also