BASS.NET API for the Un4seen BASS Audio Library

WaveFormPosition2Frames Method (Int64)

BASS.NET API for the Un4seen BASS Audio Library
Converts a given position (in bytes) to the frame number.

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

public int Position2Frames(
	long bytes
)

Parameters

bytes
Type: SystemInt64
The position (in bytes) which should be translated to a frame number.

Return Value

Type: Int32
The frame number which represents the position. Or -1, if an error occured or the wave form has not been rendered yet.
Remarks

The wave form must have been rendered already before you can use this method.

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) this method would return the frame according to the rendering process, meaning the position would reflect a different value.

You might use the SyncPlayback(Int32) method to ensure, that the position will automatically be converted accordingly.

See Also

Reference