for your first problem :
play more than one file at a time:
Code:
Type DirectShowbuf
Event As IMediaEvent
Control As IMediaControl
Position As IMediaPosition
Audio As IBasicAudio
Video As IBasicVideo
Video_Window As IVideoWindow
End Type
Function DSInit(DS As DirectShowbuf) As Boolean
On Error GoTo Error_Handler
Set DS.Control = New FilgraphManager
Set DS.Event = DS.Control
Set DS.Position = DS.Control
DS.Position.Rate = 1
DSInitM = False
Exit Function
Error_Handler:
' Call ShowErrorMsg()
DSInit = True
End Function
you can use this last function to open as many devices as you want,
and thus play as many files as you want.
you should be aware what you're doing, because you need also to close those
devices.
you can for examples use an array to store each device, like this:
Code:
Dim DSArray[10] As DirectSHowBuf
Dim DSDeviceNum As Integer
Private Sub Form_Load()
For DSDeviceNum = 0 To 3
Call DSInit(DSArray[DSDeviceNum])
DSDeviceNum = DSDeviceNum + 1
Next
For DSDeviceNum = 0 To 3
DSArray[DSDeviceNum].Control.RenderFile (fName)
Next
End Sub