BASS_CD_SetInterface


Sets the interface to use to access CD drives.

DWORD BASS_CD_SetInterface(
    DWORD iface
);

Parameters

ifaceThe interface to use, which can be one of the following.
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.
BASS_CD_IF_LINUXThis interface is always used on Linux.

Return value

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

Error codes

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

Remarks

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.

See also

BASS_CD_DoorIsLocked, BASS_CD_DoorIsOpen, BASS_CD_GetInfo