FormatAudioGet Method (MFileClass)
type of the format
properties of current audio format (bitrate, number of channels, value of samples per second and number of tracks)
number of channel
full name of format (for example, "44100 Hz, 6 Ch, 16-bit")
Gets the current audio format.
Syntax
Public Overridable Sub FormatAudioGet( _
   ByVal _eFormatType As eMFormatType, _
   ByRef _pAudProps As M_AUD_PROPS, _
   ByRef _pnIndex As Integer, _
   ByRef _pbsName As String _
) 
public virtual void FormatAudioGet( 
   eMFormatType _eFormatType,
   out M_AUD_PROPS _pAudProps,
   out int _pnIndex,
   out string _pbsName
)
public procedure FormatAudioGet( 
    _eFormatType: eMFormatType;
   Out  _pAudProps: M_AUD_PROPS;
   Out  _pnIndex: Integer;
   Out  _pbsName: String
); virtual; 
public: virtual void FormatAudioGet( 
   eMFormatType _eFormatType,
   [PARAMFLAG::Out] M_AUD_PROPS _pAudProps,
   [PARAMFLAG::Out] int _pnIndex,
   [PARAMFLAG::Out] BSTR* _pbsName
) 

Parameters

_eFormatType
type of the format
_pAudProps
properties of current audio format (bitrate, number of channels, value of samples per second and number of tracks)
_pnIndex
number of channel
_pbsName
full name of format (for example, "44100 Hz, 6 Ch, 16-bit")
Example

Here is example of how to set custom format to the playlist:

Dim nIndex As Integer
Dim strFormat As String
Dim audProps As M_AUD_PROPS
Dim myPlaylist As New MPlaylistClass()
myPlaylist.FormatAudioGet(eMFormatType.eMFT_Output, audProps, nIndex, strFormat)
audProps.nSamplesPerSec = 48000
myPlaylist.FormatAudioSet(eMFormatType.eMFT_Convert, audProps)
int nIndex;
string strFormat;
M_AUD_PROPS audProps;
MPlaylistClass myPlaylist = new MPlaylistClass();
myPlaylist.FormatAudioGet(eMFormatType.eMFT_Output, out audProps, out nIndex, out strFormat);
audProps.nSamplesPerSec = 48000;
myPlaylist.FormatAudioSet(eMFormatType.eMFT_Convert, ref audProps);
var
m_objPlaylist;;
m_pFormat;
audProps: M_AUD_PROPS;
strFormat: string;
nIndex: integer;
begin
m_objPlaylist:= CreateComObject(CLASS_MPlaylist) as MPlaylist;
m_pFormat := m_objPlaylist as IMFormat;
m_pFormat.FormatAudioGet(eMFT_Output, audProps, nIndex, strFormat);
audPorps.nSamplesPerSec := 48000;
m_pFormat.FormatAudioSet(eMFT_Convert, audProps);
end;
See Also

Reference

MFileClass Class
MFileClass Members