3.1.7.7 TSPI_phoneGetGain

Syntax

LONG TSPI_phoneGetGain(dwRequestID, hdPhone, dwHookSwitchDev, lpdwGain)
This function returns the gain setting of the mic of specified phone's hookswitch device.

Parameters

DRV_REQUESTID dwRequestID
Specifies the identifier of the asynchronous request. The Service Provider returns this value if the function completes asynchronously.

HDRVPHONE hdPhone
Specifies the Service Provider's opaque handle to the phone whose gain is to be retrieved.

DWORD dwHookSwitchDev
Identifies the hookswitch device whose gain level is queried, of type PHONEHOOKSWITCHDEV.

PHONEHOOKSWITCHDEV_HANDSET
This is the phone's handset.

PHONEHOOKSWITCHDEV_SPEAKER
This is the phone's speakerphone or adjunct.

PHONEHOOKSWITCHDEV_HEADSET
This is the phone's headset.

LPDWORD lpdwGain
Specifies a far pointer to a DWORD sized location containing the current gain setting of the hookswitch mic component. dwGain specifies the volume level of the hookswitch device. This is a number in the range 0x00000000, which is silence to 0x0000FFFF which is maximum volume. The actual granularity and quantization of gain settings in this range are service provider specific.

Return Value

Returns zero if the function is successful, the (positive) dwRequestID value if the function will be completed asynchronously, or a negative error number if an error has occurred. Possible error returns are:

PHONEERR_INVALPHONEHANDLE
The specified device handle is invalid.

PHONEERR_INVALPOINTER
The specified pointer parameter is invalid.

PHONEERR_INVALPHONESTATE
The phone device is not in a valid state for the requested operation.

PHONEERR_INVALHOOKSWITCHDEV
The hookswitch device parameter is invalid.

PHONEERR_OPERATIONUNAVAIL
The specified operation is not available.

PHONEERR_OPERATIONFAILED
The specified operation failed for unspecified reasons.

Comments

None.

See Also

Functions: TSPI_phoneGetDevCaps, TSPI_phoneSetGain
Data Types: PHONECAPS