BASS.NET API for the Un4seen BASS Audio LibraryBassCdBASS_CD_Analog_GetPosition Method (Int32)BASS.NET API for the Un4seen BASS Audio Library
Retrieves the current position and track on a drive.

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

[DllImportAttribute("basscd.dll", CharSet = CharSet.Auto)]
public static int BASS_CD_Analog_GetPosition(
	int drive
)

Parameters

drive
Type: SystemInt32
The drive... 0 = the first drive.

Return Value

Type: Int32
If an error occurs, -1 is returned, use BASS_ErrorGetCode to get the error code. If successful, the HIWORD contains the track number (0=first), and the LOWORD contains the offset (in frames).
Remarks

ERROR CODEDescription
BASS_ERROR_DEVICEdrive is invalid.
BASS_ERROR_UNKNOWNSome other mystery problem!

Examples

VB
' get the position
Dim pos As Integer = BassCd.BASS_CD_Analog_GetPosition(0)
Dim track As Integer = Utils.HighWord32(pos)
Dim frame As Integer = Utils.LowWord32(pos)
Dim sec As Double = frame / 75.0
// get the position
int pos = BassCd.BASS_CD_Analog_GetPosition(0);
int track = Utils.HighWord32(pos);
int frame = Utils.LowWord32(pos);
double sec = frame / 75.0;
See Also

Reference