ScenesGetByIndex Method (MMixerClass)
index of the scene
ID of the scene
scene object
Gets the scene by its index.
Syntax
Public Overridable Sub ScenesGetByIndex( _
   ByVal _nIndex As Integer, _
   ByRef _pbsSceneID As String, _
   ByRef _ppScene As IMElements _
) 
public virtual void ScenesGetByIndex( 
   int _nIndex,
   out string _pbsSceneID,
   out IMElements _ppScene
)
public procedure ScenesGetByIndex( 
    _nIndex: Integer;
   Out  _pbsSceneID: String;
   Out  _ppScene: IMElements
); virtual; 
public: virtual void ScenesGetByIndex( 
   int _nIndex,
   [PARAMFLAG::Out] BSTR* _pbsSceneID,
   [PARAMFLAG::Out] IMElements* _ppScene
) 

Parameters

_nIndex
index of the scene
_pbsSceneID
ID of the scene
_ppScene
scene object
Example

Here is example of how to remove all scenes form mixer configuration:

Dim myMixer As New MMixerClass()
myMixer.ObjectStart(Nothing)
Dim nCount As Integer
myMixer.ScenesGetCount(nCount)
For i As Integer = 0 To nCount - 1
Dim mySceneID As String
Dim myScene As IMElements
myMixer.ScenesGetByIndex(i, mySceneID, myScene)
myMixer.ScenesRemove(mySceneID)
Next
MMixerClass myMixer= new MMixerClass();
myMixer.ObjectStart(null);
int nCount;
myMixer.ScenesGetCount(out nCount);
for (int i=0; i<nCount; i++)
{
string mySceneID;
IMElements myScene;
myMixer.ScenesGetByIndex(i, out mySceneID, out myScene);
myMixer.ScenesRemove(mySceneID);
}
var
myMixer: MMixer;
myObject: IMObject;
myScenes: IMScenes;
mySceneID: widestring;
myScene: IMElements;
i, nCount: integer;
begin
//initialize a mixer
myMixer:= CreateComObject(CLASS_MMixer) as MMixer;
myObject:= myMixer as IMobject;
myObject.ObjectStart(nil);
myScenes := myMixer as IMScenes;
myScenes.ScenesGetCount(nCount);
for i:=0 to nCount-1 do
begin
myScenes.ScenesGetByIndex(i, mySceneID, myScene);
myScenes.ScenesRemove(mySceneID);
end;
end;
See Also

Reference

MMixerClass Class
MMixerClass Members