BASS.NET API for the Un4seen BASS Audio LibraryBassBASS_RecordSetInput Method BASS.NET API for the Un4seen BASS Audio Library
Adjusts the settings of a recording input source.

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

[DllImportAttribute("bass.dll", CharSet = CharSet.Unicode)]
public static bool BASS_RecordSetInput(
	int input,
	BASSInput setting,
	float volume
)

Parameters

input
Type: SystemInt32
The input to adjust the settings of... 0 = first, -1 = master.
setting
Type: Un4seen.BassBASSInput
The new setting... a combination of these flags (BASSInput):
BASS_INPUT_OFFDisable the input. This flag can't be used when the device supports only one input at a time.
BASS_INPUT_ONEnable the input. If the device only allows one input at a time, then any previously enabled input will be disabled by this.
BASS_INPUT_NONEDon't change any setting. Use this flag, if you only want to set the volume.
volume
Type: SystemSingle
The volume level... 0 (silent) to 1 (max), less than 0 = leave current.

Return Value

Type: Boolean
If successful, is returned, else is returned. Use BASS_ErrorGetCode to get the error code.
Remarks

The actual volume level may not be exactly the same as requested, due to underlying precision differences. BASS_RecordGetInput(Int32, Single) can be used to confirm what the volume is.

The volume curve used by this function is always linear, the BASS_CONFIG_CURVE_VOL config option setting has no effect on this.

Changes made by this function are system-wide, ie. other software using the device will be affected by it.

ERROR CODEDescription
BASS_ERROR_INITBASS_RecordInit(Int32) has not been successfully called - there are no initialized.
BASS_ERROR_ILLPARAMinput or volume is invalid.
BASS_NOTAVAILThe soundcard/driver doesn't allow you to change the input or it's volume.
BASS_ERROR_UNKNOWNSome other mystery problem!

Platform-specific

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

VB
' Disable the master input without changing the volume:
Bass.BASS_RecordSetInput(-1, BASSInput.BASS_INPUT_OFF, -1F)

' Enable the first input and set the volume to 50%:
Bass.BASS_RecordSetInput(0, BASSInput.BASS_INPUT_ON, 0.5F)

' Set the volume of the first input without changing the settings:
Bass.BASS_RecordSetInput(0, BASSInput.BASS_INPUT_NONE, 1F );
// Disable the master input without changing the volume:
Bass.BASS_RecordSetInput(-1, BASSInput.BASS_INPUT_OFF, -1f );

// Enable the first input and set the volume to 50%:
Bass.BASS_RecordSetInput(0, BASSInput.BASS_INPUT_ON, 0.5f );

// Set the volume of the first input without changing the settings:
Bass.BASS_RecordSetInput(0, BASSInput.BASS_INPUT_NONE, 1f );
See Also

Reference