MPLATFORMLib Namespace > MMixerClass Class : StreamsRemoveByIndex Method |
Public Overridable Sub StreamsRemoveByIndex( _ ByVal _nIndex As Integer, _ ByVal _nExtraRemove As Integer, _ ByVal _dblTimeForChange As Double _ )
public virtual void StreamsRemoveByIndex( int _nIndex, int _nExtraRemove, double _dblTimeForChange )
public procedure StreamsRemoveByIndex( _nIndex: Integer; _nExtraRemove: Integer; _dblTimeForChange: Double ); virtual;
public: virtual void StreamsRemoveByIndex( int _nIndex, int _nExtraRemove, double _dblTimeForChange )
Here is example of how to remove all streams without obtaining of them count
'initialize a mixer Dim m_objMixer As New MMixerClass() m_objMixer.ObjectStart(Nothing) m_objMixer.FilePlayStart() 'add streams to the mixer Dim pItem As MItem m_objMixer.StreamsAdd("", Nothing, "C:\myFile.wmv", "", pItem, 1.0) m_objMixer.StreamsAdd("", Nothing, "C:\myFile1.wmv", "", pItem, 1.0) m_objMixer.StreamsAdd("", Nothing, "C:\myFile2.wmv", "", pItem, 1.0) 'remove all items m_objMixer.StreamsRemoveByIndex(0, 1000, 2.0)
//initialize a mixer MMixerClass m_objMixer = new MMixerClass(); m_objMixer.ObjectStart(null); m_objMixer.FilePlayStart(); //add streams to the mixer MItem pItem; m_objMixer.StreamsAdd("", null, @"C:\myFile.wmv", "", out pItem, 1.00); m_objMixer.StreamsAdd("", null, @"C:\myFile1.wmv", "", out pItem, 1.00); m_objMixer.StreamsAdd("", null, @"C:\myFile2.wmv", "", out pItem, 1.00); //remove all items m_objMixer.StreamsRemoveByIndex(0, 1000, 2.0);
var myItem: MItem; myMixer: MMixer; myFile: IMfile; myObject: IMObject; myStreams: IMstreams; begin //initialize a mixer myMixer:= CreateComObject(CLASS_MMixer) as MMixer; myStreams:= myMixer as IMStreams; myFile:= myMixer as IMFile; myObject:= myMixer as IMobject; myObject.ObjectStart(nil); myFile.FilePlayStart(); //add stream to the mixer myStreams.StreamsAdd('', nil, 'C:\myFile.wmv', '', myItem, 2.0); myStreams.StreamsAdd('', nil, 'C:\myFile1.wmv', '', myItem, 2.0); myStreams.StreamsAdd('', nil, 'C:\myFile2.wmv', '', myItem, 2.0); myStreams.StreamsRemoveByIndex(0, 1000, 2.0); end;