BASS.NET API for the Un4seen BASS Audio LibraryBassCdBASS_CD_SetInterface Method BASS.NET API for the Un4seen BASS Audio Library
Sets the interface to use to access CD drives

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

public static int BASS_CD_SetInterface(
	BASSCDInterface iface


Type: Un4seen.Bass.AddOn.CdBASSCDInterface
The interface to use, which can be one of the following (see BASSCDInterface):
BASS_CD_IF_AUTOAutomatically detect an available interface. The interfaces are checked in the order that they are listed here. For example, if both SPTI and ASPI are available, SPTI will be used.
BASS_CD_IF_SPTISCSI Pass-Through Interface. This is only available on NT-based Windows, not Windows 9x, and generally only to administrator user accounts, not limited/restricted user accounts.
BASS_CD_IF_ASPIAdvanced SCSI Programming Interface. This is the only interface available on Windows 9x, and can also be installed on NT-based Windows.
BASS_CD_IF_WIOWindows I/O. Like SPTI, this is only available on NT-based Windows, but it is also available to limited/restricted user accounts. Some features are not available via this interface, notably sub-channel data reading and read speed control (except on Vista or newer). Door status detection is also affected.

Return Value

Type: Int32
If successful, the interface being used is returned, else -1 is returned. Use BASS_ErrorGetCode to get the error code.

The interface can be changed at any time, but any existing CD streams will be freed in doing so. The current interface can also be reinitialized, to detect any newly connected drives.

Use of this function is optional. If it is not used, BASSCD will automatically detect an available interface.

ERROR CODEDescription
BASS_ERROR_ILLPARAMiface is invalid.
BASS_ERROR_NOTAVAILThe interface is not available, or has no drives available.

See Also