CDSAudio.Runmethod
Runs all the filters in the filter graph.
Syntax
FUNCTION Run () AS HRESULT
Description
Runs all the filters in the filter graph.
Remarks
If the filter graph is stopped, this method pauses the graph before running. If the graph is already running, the method returns S_OK but has no effect.
The graph runs until the application calls the Pause or Stop method. When playback reaches the end of the stream, the graph continues to run, but the filters do not stream any more data. At that point, the application can pause or stop the graph.
This method does not seek to the beginning of the stream. Therefore, if you run the graph, pause it, and then run it again, playback resumes from the paused position. If you run the graph after it has reached the end of the stream, nothing is rendered. To seek the graph, use the the GetCurrentPosition and SetPositions methods.
If method returns S_FALSE, it means that the method returned before all of the filters switched to a running state. The filters will complete the transition after the method returns. Optionally, you can wait for the transition to complete by calling the GetState method with a timeout value. However, this is not required.
If the Run method returns an error code, it means that one or more filters failed to run. However, some filters might be in a running state. In a multistream graph, entire streams might be playing successfully. Typically the application would tear down the graph and report an error in this case.
Reference
- Include file
CDSAudio.inc - Defined in AfxNova/CDSAudio.inc:169
- Documented in Audio/CDSAudio Class.md
- Topic: CDSAudio Class