gvSetCaptureThreshold

GameSpy SDK

gvSetCaptureThreshold

Sets the threshold volume on a device. A packet will only be passed to the application if its peak volume is at least as high as the capture threshold.

void gvSetCaptureThreshold(
GVDevice device,
GVScalar threshold );
RoutineRequired HeaderDistribution
gvSetCaptureThreshold<gv.h>SDKZIP

Parameters

device
[in] The handle to the device.
threshold
[in] The threshold volume

Remarks

The range for threshold is 0.0 to 1.0. A value of approximately 0.10 to 0.15 will generally work well, although ideally the user should have a way to configure the threshold. GV will continue passing packets to the application for about half a second after the peak volume drops below the threshold. This helps to catch speech in which the level trails off or has a small dip. The default threshold is 0.0, which means that all audio will be considered over the threshold and will be captured. To remove a threshold that has been set, simply call this function again with a threshold of 0.0.

Section Reference: Gamespy Voice SDK

See Also: gvGetCaptureThreshold