BASS.NET API for the Un4seen BASS Audio Library

WaveFormGetCuePoints Method (Int64, Int64, Double, Double, Int32, Int32)

BASS.NET API for the Un4seen BASS Audio Library
Determines silence positions of a rendered wave form within a given range.

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

public bool GetCuePoints(
	ref long startpos,
	ref long endpos,
	double thresholdIn,
	double thresholdOut,
	int frameStart,
	int frameEnd
)

Parameters

startpos
Type: SystemInt64
Returns the position in bytes where the sound begins (cue-in position).
endpos
Type: SystemInt64
Returns the position in bytes where the sound ends (cue-out position).
thresholdIn
Type: SystemDouble
The threshold in dB (e.g. -24.0dB) which should be used to detect silence resp. sound at the beginning of the track.
thresholdOut
Type: SystemDouble
The threshold in dB (e.g. -24.0dB) which should be used to detect silence resp. sound at the end of the track.
frameStart
Type: SystemInt32
The frame position where to start the silence detection (between 0 and FramesRendered, or -1 to scan from the beginning).
frameEnd
Type: SystemInt32
The frame position til where to perform the silence detection (between 0 and FramesRendered, or -1 to scan til the end; must be bigger than frameStart).

Return Value

Type: Boolean
on success, else .
Remarks

If your rendering method and your playback stream used different flags during creation (e.g. rendering was done using the BASS_DEFAULT flag whereas your playback stream uses BASS_SAMPLE_FLOAT) getting the cue points might result in different positions, meaning the positions would reflect a different value during playback. But if you called the SyncPlayback(Int32) method this will ensure, that the position will be converted accordingly.

Examples

C#
long startpos = 0;
long endpos   = 0;
WF.GetCuePoints(ref startpos, ref endpos, -24.0, -50.0, -1, -1);
WF.AddMarker( "CUE", startpos );
WF.AddMarker( "END", endpos );
...
See Also

Reference