Windows Media Player 11 SDK Flow of ControlĀ
Previous | Next |
Flow of Control
Audio data comes into Windows Media Player continuously through a file or a stream. That data is passed to your visualization. You draw on a defined surface and pass that surface back to Windows Media Player. This interchange happens several times a second, and to the user, the result is a pleasing animation that moves in time to the music.
Here is the specific sequence of the visualization program flow:
- At a timed interval, Windows Media Player takes a snapshot of the audio that is playing.
- Windows Media Player supplies the data from that snapshot to your visualization through the Render function and the RenderWindowed function.
- You must write code that will run when Render and RenderWindowed is called. Your code draws by using a device context defined by Windows Media Player when rendering windowless, or by using a window that you create when rendering windowed.
- In a region specified by the current skin, Windows Media Player displays what your code drew.
- This process repeats several times a second, creating graphical animations that are timed to the music. When the music stops playing, the visualization stops.
See Also
Previous | Next |