StreamsReorder Method (MMixerClass)
index of item to be changed
index change number
Possible values:
time interval for changes in seconds
Changes the order of streams.
Syntax
Public Overridable Sub StreamsReorder( _
   ByVal _pStream As MItem, _
   ByVal _nIndexAdd As Integer, _
   ByVal _dblTimeForChange As Double _
) 
public virtual void StreamsReorder( 
   MItem _pStream,
   int _nIndexAdd,
   double _dblTimeForChange
)
public procedure StreamsReorder( 
    _pStream: MItem;
    _nIndexAdd: Integer;
    _dblTimeForChange: Double
); virtual; 
public: virtual void StreamsReorder( 
   MItem* _pStream,
   int _nIndexAdd,
   double _dblTimeForChange
) 

Parameters

_pStream
index of item to be changed
_nIndexAdd
index change number
Possible values:
  • positive value - position is changed in direction to end of stream list.
  • negative value - position is changed in direction to beggining of stream list.
_dblTimeForChange
time interval for changes in seconds
Example

Here is example of how to change the order of streams:

'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)
m_objMixer.StreamsReorder(2, -1, 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);
m_objMixer.StreamsReorder(2, -1, 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.StreamsReorder(2, -1, 2.0);
end;
See Also

Reference

MMixerClass Class
MMixerClass Members