ASIO.DeviceMasterVolumeSet method |
|
Remarks
Sets the master volume for input or output ASIO channels of a specific ASIO device.
When changing the master volume, original volume level for single channels will be maintained and multiplied by the master volume. If for example you have set the volume level for channel 0 to "50" and the volume level for channel 1 to "75", by applying an amplified master volume of "200" you will obtain that channel 0 will have a volume level of "100" and channel 1 a volume level of "150".
For further details about the use of ASIO drivers see the ASIO object section and the How to manage ASIO drivers tutorial.
Syntax
[Visual Basic] control.ASIO.DeviceMasterVolumeSet ( nDeviceIndex as Integer, bInputChannel as enumBoolean, fVolume as Single, nScaleType as enumVolumeScales ) as enumErrorCodes |
[C++] short control.ASIO.DeviceMasterVolumeSet ( short nDeviceIndex, short bInputChannel, float fVolume, short nScaleType ); |
Parameter |
Description |
|||||||||
|
|
|||||||||
nDeviceIndex |
Number representing the zero-based index of the ASIO device. This index is related to available ASIO devices so it must be the related to the enumeration performed through the ASIO.DeviceGetCount and ASIO.DeviceGetDesc methods: it must not be confused with indexes related to generic input devices enumerated through the GetInputDevicesCount and GetInputDeviceDesc methods which may contain both DirectSound and ASIO devices. |
|||||||||
bInputChannel |
Boolean value that specifies if we need to modify the master volume for input or output channels. Supported values are the following:
|
|||||||||
fVolume |
New volume expressed in the unit specified by the nScaleType parameter below. |
|||||||||
nScaleType |
The volume scaling type. Supported values are the following:
|
Return value
Value |
Meaning |
|
|
Negative value |
An error occurred (see the LastError property for further error details) |
enumErrorCodes.ERR_NOERROR (0) |
The volume has been changed correctly |