Adjusts the settings of a recording input source.
Namespace: Un4seen.Bass
Assembly: Bass.Net (in Bass.Net.dll) Version: 2.4.17.5
Syntax
[DllImportAttribute("bass")] 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_OFF Disable the input. This flag can't be used when the device supports only one input at a time. BASS_INPUT_ON Enable the input. If the device only allows one input at a time, then any previously enabled input will be disabled by this. BASS_INPUT_NONE Don'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: BooleanIf 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 CODE | Description |
---|---|
BASS_ERROR_INIT | BASS_RecordInit(Int32) has not been successfully called - there are no initialized. |
BASS_ERROR_ILLPARAM | input or volume is invalid. |
BASS_NOTAVAIL | The soundcard/driver doesn't allow you to change the input or it's volume. |
BASS_ERROR_UNKNOWN | Some 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
// 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