StreamsGetCount Method (MMixerClass)
number of the streams
Gets the count of miximg streams.
Syntax
Public Overridable Sub StreamsGetCount( _
   ByRef _pnCount As Integer _
) 
public virtual void StreamsGetCount( 
   out int _pnCount
)
public procedure StreamsGetCount( 
   Out  _pnCount: Integer
); virtual; 
public: virtual void StreamsGetCount( 
   [PARAMFLAG::Out] int _pnCount
) 

Parameters

_pnCount
number of the streams
Example

Here is example of how to set some properties to all streams in mixer:

'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)
et "loop" to "false" for all streams
Dim nFiles As Integer = 0
m_objMixer.StreamsGetCount(nFiles)
For i As Integer = 0 To nFiles - 1
Dim myItem As MItem
Dim strStreamID As String
m_objMixer.StreamsGetByIndex(i, strStreamID, myItem)
DirectCast(myItem, IMProps).PropsSet("loop", "false")
Next
//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);
//set "loop" to "false" for all streams
int nFiles = 0;
m_objMixer.StreamsGetCount(out nFiles);
for (int i = 0; i < nFiles; i++)
{
MItem myItem;
string strStreamID;
m_objMixer.StreamsGetByIndex(i, out strStreamID, out myItem);
((IMProps)myItem).PropsSet("loop", "false");
}
var
myItem: MItem;
myProps: IMProps;
myMixer: MMixer;
myFile: IMfile;
myObject: IMObject;
myStreams: IMstreams;
myIndex, i, nCount: integer;
myStreamID: widestring;
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.StreamsGetCount(nCount);
for i:=0 to nCount-1 do
begin
myStreams.StreamsGetByIndex(1, myStreamID, myItem);
myProps:= myItem as IMProps;
myProps.PropsSet('loop', 'false');
end;
end;
See Also

Reference

MMixerClass Class
MMixerClass Members