The FormatRateGetSampleBlockSize API procedure can be used to obtain the number of sample bytes required for any of the supported 20Ms audio data types. You can use this procedure to query these sample block size values instead of hard coding them into your application software.

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

Syntax

C#
public VoipMediaEngine..::.FORMAT_RATE_STATUS FormatRateGetSampleBlockSize(
	VoipMediaEngine..::.AUDIO_BANDWIDTH DataType,
	ref int SampleBlockSize
)
Visual Basic (Declaration)
Public Function FormatRateGetSampleBlockSize ( _
	DataType As VoipMediaEngine..::.AUDIO_BANDWIDTH, _
	ByRef SampleBlockSize As Integer _
) As VoipMediaEngine..::.FORMAT_RATE_STATUS
Visual C++
public:
VoipMediaEngine..::.FORMAT_RATE_STATUS FormatRateGetSampleBlockSize(
	VoipMediaEngine..::.AUDIO_BANDWIDTH DataType, 
	int% SampleBlockSize
)
J#
public VoipMediaEngine..::.FORMAT_RATE_STATUS FormatRateGetSampleBlockSize(
	VoipMediaEngine..::.AUDIO_BANDWIDTH DataType,
	/** @ref */int SampleBlockSize
)

Parameters

DataType
Type: LanScape..::.VoipMediaEngine..::.AUDIO_BANDWIDTH
The audio data type. This value can be specified using any one of the 20Ms audio data types defined in the VoipMediaEngine..::.AUDIO_BANDWIDTH enumeration except for Speex. Also, do not specify one of the 30Ms data types.
SampleBlockSize
Type: System..::.Int32 %
A reference to a variable where the sample block size in bytes will be stored.

Return Value

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

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

Return ValueDescription
FORMAT_RATE_UNKNOWN_ERROR
A "catch all" error return value.
FORMAT_RATE_BAD_HANDLE
Bad format/rate converter handle specified.
FORMAT_RATE_BAD_DATA_TYPE
The format/rate specified is not acceptable for the requested operation.

Remarks

None.

See Also