Alvas.Audio Class Library

AudioCompressionManager.GetCompatibleFormat Method 

Gets the format for the conversion from the specified format and specified format tag.

[Visual Basic]
Public Shared Function GetCompatibleFormat( _
   ByVal format As IntPtr, _
   ByVal formatTag As Short _
) As IntPtr
[C#]
public static IntPtr GetCompatibleFormat(
   IntPtr format,
   Int16 formatTag
);

Parameters

format
The format handle
formatTag
The format tag

Return Value

Example

This example shows simple using of GetCompatibleFormat method.

IntPtr formaGsm = AudioCompressionManager.GetCompatibleFormat(AudioCompressionManager.GetPcmFormat(1, 16, 16000),
                AudioCompressionManager.Gsm610FormatTag);
FormatDetails fd = AudioCompressionManager.GetFormatDetails(formaGsm, true);
Console.WriteLine(fd.ToString());
 

See Also

AudioCompressionManager Class | Alvas.Audio Namespace