BASS.NET API for the Un4seen BASS Audio Library

BassBASS_ChannelGetDevice Method

BASS.NET API for the Un4seen BASS Audio Library
Retrieves the device that the channel is using.

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

[DllImportAttribute("bass")]
public static int BASS_ChannelGetDevice(
	int handle
)

Parameters

handle
Type: SystemInt32
The channel handle... a HCHANNEL, HMUSIC, HSTREAM, or HRECORD. HSAMPLE handles may also be used.

Return Value

Type: Int32
If successful, the device number is returned, else -1 is returned. Use BASS_ErrorGetCode to get the error code.
Remarks

Recording devices are indicated by the HIWORD of the return value being 1, when this function is called with a HRECORD channel.

The return value may be BASS_NODEVICE (0x20000), if the channel is not associated with a device.

ERROR CODEDescription
BASS_ERROR_HANDLEhandle is not a valid channel.

Examples

Check, if a device number is a recording device:
bool isRecordingDevice = false;
int device = Bass.BASS_ChannelGetDevice(stream);
if (device != -1 && Utils.HighWord(device) == 1)
  isRecordingDevice = true;
See Also

Reference