Windows Media Player 11 SDK Flow of ControlĀ 

Windows Media Player SDK banner art

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:

  1. At a timed interval, Windows Media Player takes a snapshot of the audio that is playing.
  2. Windows Media Player supplies the data from that snapshot to your visualization through the Render function and the RenderWindowed function.
  3. 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.
  4. In a region specified by the current skin, Windows Media Player displays what your code drew.
  5. 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