MPLATFORMLib Namespace > IMFormat Interface : FormatAudioGetByIndex Method |
Sub FormatAudioGetByIndex( _ ByVal _eFormatType As eMFormatType, _ ByVal _nIndex As Integer, _ ByRef _pAudProps As M_AUD_PROPS, _ ByRef _pbsName As String _ )
void FormatAudioGetByIndex( eMFormatType _eFormatType, int _nIndex, out M_AUD_PROPS _pAudProps, out string _pbsName )
procedure FormatAudioGetByIndex( _eFormatType: eMFormatType; _nIndex: Integer; Out _pAudProps: M_AUD_PROPS; Out _pbsName: String );
void FormatAudioGetByIndex( eMFormatType _eFormatType, int _nIndex, [PARAMFLAG::Out] M_AUD_PROPS _pAudProps, [PARAMFLAG::Out] BSTR* _pbsName )
Here is example of how to set standard format to the playlist:
Dim myPlaylist As New MPlaylistClass() Dim audProps As New M_AUD_PROPS() Dim strFormat As String Dim nCount As Integer myPlaylist.FormatAudioGetCount(nCount) myPlaylist.FormatAudioGetByIndex(eMFormatType.eMFT_Convert, nCount - 1, audProps, strFormat) myPlaylist.FormatAudioSet(eMFormatType.eMFT_Convert, audProps)
MPlaylistClass myPlaylist = new MPlaylistClass(); M_AUD_PROPS audProps = new M_AUD_PROPS(); string strFormat; int nCount; myPlaylist.FormatAudioGetCount(out nCount); myPlaylist.FormatAudioGetByIndex(eMFormatType.eMFT_Convert, nCount - 1, out audProps, out strFormat); myPlaylist.FormatAudioSet(eMFormatType.eMFT_Convert, ref audProps);
var myPlaylist: MPlaylist; myFormat: IMFormat; nCount: integer; audProps: M_AUD_PROPS; strFormat: string; begin myPlaylist:= CreateComObject(CLASS_MPlaylist) as MPlaylist; myFormat := myPlaylist as IMFormat; myFormat.FormatAudioGetCount(nCount); myFormat.FormatAudioGetByIndex(eMFT_Convert, nCount-2, audProps, strFormat); myFormat.FormatAudioSet(eMFT_Convert, audProps); end;