StreamsRemoveByIndex Method (MMixerClass)
index of item to start remove from
number of items to be removed
Possible values:
time interval for changes in seconds
Removes multiple streams.
Syntax
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
) 

Parameters

_nIndex
index of item to start remove from
_nExtraRemove
number of items to be removed
Possible values:
  • 0 - remove single stream.
  • positive value - number of streams to be removed is calculated to the end of stream list.
  • negative value - number or streams to be removed is calculated to the beginning of stream list. If this absolute value is greater than _nIndex then all stream list items from the very beginning will be removed.
_dblTimeForChange
time interval for changes in seconds
Example

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;
See Also

Reference

MMixerClass Class
MMixerClass Members