gvSetCustomCaptureAudio

GameSpy SDK

gvSetCustomCaptureAudio

For a custom capture device, encodes captured audio from a stream into a packet, storing it at provided memory.

GVBool gvSetCustomCaptureAudio(
GVDevice device,
const GVSample * audio,
int numSamples,
GVByte * packet,
int * packetLen,
GVFrameStamp * frameStamp,
GVScalar * volume );
RoutineRequired HeaderDistribution
gvSetCustomCaptureAudio<gv.h>SDKZIP

Return Value

Returns GVTrue if the function successfully encodes the audio into the packet, otherwise GVFalse. GVFalse will be returned if a threshold is set and the audio’s peak volume did not cross the threshold.

Parameters

device
[in] The handle to the custome capture device.
audio
[in] The incoming audio stream.
numSamples
[in] The number of samples to capture.
packet
[out] The memory location where the packet will be stored.
packetLen
[ref] The number of bytes available in the packet,
frameStamp
[out] Receives the frame stamp for the packet.
volume
[out] Receives the peak volume for the packet.

Remarks

The numSamples parameter must be a multiple of the codec's samplesPerFrame; this ensures that no data needs to be buffered by the SDK.

Section Reference: Gamespy Voice SDK

See Also: gvGetCodecInfo