Windows Media Player SDK banner art
PreviousNext

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.
  3. You must write code that will run when Render is called. Your code draws on a window defined by Windows Media Player.
  4. In a window 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.
PreviousNext


© 2000-2001 Microsoft Corporation. All rights reserved.