BASS_RecordSetInput


Adjusts the settings of a recording input source.

BOOL BASS_RecordSetInput(
    int input,
    DWORD flags,
    float volume
);

Parameters

inputThe input to adjust the settings of... 0 = first, -1 = master.
flagsThe new setting... a combination of these flags.
BASS_INPUT_OFFDisable the input. This flag cannot 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.
volumeThe volume level... 0 (silent) to 1 (max), less than 0 = leave current.

Return value

If successful, TRUE is returned, else FALSE is returned. Use BASS_ErrorGetCode to get the error code.

Error codes

BASS_ERROR_INITBASS_RecordInit has not been successfully called.
BASS_ERROR_ILLPARAMinput or volume is invalid.
BASS_ERROR_NOTAVAILThe input does not have the necessary controls to apply the flags and/or volume. If attempting to set both at the same time, try separating them to determine which is unavailable.
BASS_ERROR_UNKNOWNSome other mystery problem!

Remarks

The actual volume level may not be exactly the same as requested, due to underlying precision differences. BASS_RecordGetInput 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.

Platform-specific

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

Example

Enable the first input, and set its volume level to 50%.
BASS_RecordSetInput(0, BASS_INPUT_ON, 0.5);

See also

BASS_RecordGetInfo, BASS_RecordGetInput