BASS.NET API for the Un4seen BASS Audio Library

BassBASS_RecordGetInputType Method

BASS.NET API for the Un4seen BASS Audio Library
Retrieves the type of input of a recording input source.

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

public static BASSInputType BASS_RecordGetInputType(
	int input
)

Parameters

input
Type: SystemInt32
The input to get the settings of... 0 = first, -1 = master.

Return Value

Type: BASSInputType
One of the BASSInputType values (BASS_INPUT_TYPE_ERROR on error).
Remarks

BASS_RecordGetInput(Int32, Single) returns both, the BASSInputType (in the high-word) as well as the BASSInput (in the low-word). Use this overload to only retrieve the BASSInput without the BASSInputType.

ERROR CODEDescription
BASS_ERROR_INITBASS_RecordInit(Int32) has not been successfully called - there are no initialized.
BASS_ERROR_ILLPARAMinput is invalid.
BASS_ERROR_UNKNOWNSome other mystery problem!

Platform-specific

The input type information is only available on Windows. There is no "what you hear" type of input defined; if the device has one, it will typically come under BASS_INPUT_TYPE_ANALOG or BASS_INPUT_TYPE_UNDEF.

On OSX, there is no master input (-1), and only the currently enabled input has its volume setting available (if it has a volume control).

Examples

Find a microphone input:
Bass.BASS_RecordInit(-1); // init the default device
int mic = -1;
BASSInputType flags;
for (int n=0; (flags=Bass.BASS_RecordGetInputType(n)) != BASSInputType.BASS_INPUT_TYPE_ERROR; n++)
{
  if ( (flags & BASSInputType.BASS_INPUT_TYPE_MASK) == BASSInputType.BASS_INPUT_TYPE_MIC )
  { 
    // found the mic!
    mic = n;
    break;
  }
}
if (mic != -1)
  Console.WriteLine( "Found a MIC at input {0}", mic );
else
  Console.WriteLine( "No MIC found!" );
See Also

Reference