modify graph after file load

Jan 6, 2010 at 3:48 AM
Edited Jan 6, 2010 at 3:48 AM

Is there any way I can get read and write access to the graph after it is built? I want to redirect the sound to different sound cards and speakers.

Coordinator
Jan 6, 2010 at 9:48 AM
You cannot modify the graph unless it is in stopped state.  One possible solution is to send the audio to a tee splitter and add all audio devices.  Each DirectSound audio renderer supports IBasicAudio interface, so you can mute all audio devices except the one you want to use.
Jan 6, 2010 at 11:06 PM

essentially that is what I do now

mMediaControl = New FilgraphManager

mMediaControl.RenderFile(mMediaFile)

I then modify the resultant graph changing what I need to and then after everything is set up I play the file.

Is there a possibility to have a renderfile procedure added to mediakit which leaves the graph in a stopped state and also make the resultant graph read / write ???

The users such as myself could then have the opportunity to do what ever they liked to the graph

Regards David

 

 

Jan 9, 2010 at 8:38 AM
drainey wrote:

Is there any way I can get read and write access to the graph after it is built? I want to redirect the sound to different sound cards and speakers.

As Jeremiah says, you cannot modify graph after run. But you can by-pass it. There is a special filter - GMFBridge - a bridge/connector between different graphs. You can prepare another subgraph while the main graph is still playing and switch it on the fly (without stop effect):

http://www.gdcl.co.uk/gmfbridge/index.htm

 Marek

Jan 12, 2010 at 7:16 AM

I think I am being mis understood. Currently I render a graph using the filgraphmanager renderfile procedure. At this point the graph is still not running and I am able to modify it, which I do to set the sound card and channel. After the graph has been updated I use the IMediaControl assoiciated with the graph and execute the run procedure. I am doing this NOW so know for a fact it is possible.

I not only set the audio device but also set the channel I want to use so from a 5.1 audio card I can play 4 different sound tracks.