The SetNoiseThreshold procedure allows the application software to specify the current signal threshold that is used for all RTP transmitter DSP computations. The value set by this procedure is shared among all phone lines the telephony engine supports. The noise threshold specified in the call to this API procedure must be in the range of values as returned by the GetMinNoiseThreshold(UInt32%) and GetMaxNoiseThreshold(UInt32%) API procedures.

Namespace:  LanScape
Assembly:  LMEVoipManaged (in LMEVoipManaged.dll) Version: 6.0.5226.26700

Syntax

C#
public VoipMediaEngine..::.TELEPHONY_RETURN_VALUE SetNoiseThreshold(
	uint NoiseThreshold
)
Visual Basic (Declaration)
Public Function SetNoiseThreshold ( _
	NoiseThreshold As UInteger _
) As VoipMediaEngine..::.TELEPHONY_RETURN_VALUE
Visual C++
public:
VoipMediaEngine..::.TELEPHONY_RETURN_VALUE SetNoiseThreshold(
	unsigned int NoiseThreshold
)
J#
public VoipMediaEngine..::.TELEPHONY_RETURN_VALUE SetNoiseThreshold(
	UInt32 NoiseThreshold
)

Parameters

NoiseThreshold
Type: System..::.UInt32
The value that will be used to set the current noise threshold used by all RTP transmitters. The value you specify for this parameter should be in the range of values as returned by the GetMinNoiseThreshold(UInt32%) and GetMaxNoiseThreshold(UInt32%) API procedures.

Return Value

If the function succeeds, the return value will be SipSuccess.

If the function fails, the return value will be one of the following values as specified by the VoipMediaEngine..::.TELEPHONY_RETURN_VALUE data type.

Return ValueDescription
SipCallFailure
This value is returned by telephony API procedures to indicate general API failure. This error value is used as a "catch all error". If you receive this error, check to make sure that all parameters specified in the API procedure call are correct. Particularly, verify that pointers to memory regions are valid. This error return value is only used if a mapping to another specific error value does not exist.

(API return value)

SipInvalidHandle
Application software specified an invalid telephony handle in one of the API procedures. This usually indicates memory corruption on the part of application software.

(API return value)

Remarks

All RTP transmitters (phone lines) apply noise discrimination using the same settings. In summary, the user's application software sets an acceptable "noise level" by calling the SetNoiseThreshold(UInt32). Also, a silence decay value is set by calling the SetSilenceDecay(UInt32) API procedure. Then noise discrimination is enabled by calling the SetNoiseDiscriminationEnableState(Boolean) API procedure.

At this time, the transmitter section of each phone line will behave as a noise gate. If the energy level of transmitted audio is above the set point, audio data will be sent to the far end of the call. If the energy level of transmitted audio data falls below the set point, data will be transmitted for an additional amount of time as set by the SetSilenceDecay(UInt32) API procedure. If after the silence decay time, the transmitted audio stream is still below the minimum noise set point, audio transmission will stop.

If at any time audio transmit levels are greater than the noise set point, audio decay characteristics are reset and audio transmissions continue uninterrupted. In this way, once audio transmission starts, there will be no abrupt interruptions by the gating function.

Changing the value of the noise threshold can be done at any time. There is no need to disable noise discrimination before applying a new value.

See Also