BASS.NET API for the Un4seen BASS Audio LibraryUtilsDetectNextLevel Method BASS.NET API for the Un4seen BASS Audio Library
Finds the next position with a certain volume level.

Namespace: Un4seen.Bass
Assembly: Bass.Net (in Bass.Net.dll) Version: 2.4.12.0
Syntax

public static double DetectNextLevel(
	int decodingStream,
	float blockSize,
	double startpos,
	double dB,
	bool reverse,
	bool findZeroCrossing
)

Parameters

decodingStream
Type: SystemInt32
The decoding stream to analyze (should be created with the BASS_STREAM_PRESCAN flag).
blockSize
Type: SystemSingle
The block-size in seconds which will be used to scan the file (between 0.1 and 30 seconds).
startpos
Type: SystemDouble
The position in seconds where to start the search.
dB
Type: SystemDouble
The threshold in dB (e.g. -12.0dB) which should be searched.
reverse
Type: SystemBoolean
Search forward () or backward ().
findZeroCrossing
Type: SystemBoolean
If set to the returned position will be adjusted to the next resp. previous zero crossing in order to avoid clicks.

Return Value

Type: Double
The position with the respective volume level (if the level could not be detected, then startpos will be returned).
Remarks

As this method calls BASS_ChannelGetData(Int32, IntPtr, Int32) internally the current position of the decodingStream might be changed. So if you need to preserve this position you must remember it before calling this method and set it afterwards yourself (via BASS_ChannelGetPosition(Int32, BASSMode) and BASS_ChannelSetPosition(Int32, Int64, BASSMode)).
See Also

Reference