The CreateFormatRateConverter API procedure is used to create a format and rate converter block that you can use in your application. When you use the VOIP Media Engine's internal format and rate conversion functions, you will be able to convert between all of the supported 20Ms audio data types with ease. All of the internal format and rate conversion operations are independent of the underlying operating system and are optimized so that they are well suited for real-time sample block processing.

Before your application terminates, you must call the DestroyFormatRateConverter API procedure to destroy the rate converter and to regain its resources.

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

Syntax

C#
public VoipMediaEngine..::.FORMAT_RATE_STATUS CreateFormatRateConverter(
	VoipMediaEngine MediaEngine,
	VoipMediaEngine..::.AUDIO_BANDWIDTH SrcDataType,
	VoipMediaEngine..::.AUDIO_BANDWIDTH DestDataType
)
Visual Basic (Declaration)
Public Function CreateFormatRateConverter ( _
	MediaEngine As VoipMediaEngine, _
	SrcDataType As VoipMediaEngine..::.AUDIO_BANDWIDTH, _
	DestDataType As VoipMediaEngine..::.AUDIO_BANDWIDTH _
) As VoipMediaEngine..::.FORMAT_RATE_STATUS
Visual C++
public:
VoipMediaEngine..::.FORMAT_RATE_STATUS CreateFormatRateConverter(
	VoipMediaEngine^ MediaEngine, 
	VoipMediaEngine..::.AUDIO_BANDWIDTH SrcDataType, 
	VoipMediaEngine..::.AUDIO_BANDWIDTH DestDataType
)
J#
public VoipMediaEngine..::.FORMAT_RATE_STATUS CreateFormatRateConverter(
	VoipMediaEngine MediaEngine,
	VoipMediaEngine..::.AUDIO_BANDWIDTH SrcDataType,
	VoipMediaEngine..::.AUDIO_BANDWIDTH DestDataType
)

Parameters

MediaEngine
Type: LanScape..::.VoipMediaEngine
An instance of the media engine.
SrcDataType
Type: LanScape..::.VoipMediaEngine..::.AUDIO_BANDWIDTH
The source 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 any of the 30Ms data types. A conversion process changes audio data from the source data type to the destination data type.
DestDataType
Type: LanScape..::.VoipMediaEngine..::.AUDIO_BANDWIDTH
The destination 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 any of the 30Ms data types.

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_MEMORY_ERROR
Indicates there was a memory error.
FORMAT_RATE_BAD_DATA_TYPE
The format/rate specified is not acceptable for the requested operation.

Remarks

None.

See Also