Program Flow
The following figure illustrates the interaction between OS/2 multimedia
system components and the Memory Playlist Sample. Source code is located
in the \TOOLKIT\SAMPLES\MM\CLOCK subdirectory. (Source code for the Waveform
Audio Media Driver is located in \TOOLKIT\SAMPLES\MM\ADMCT.)
┌─────────────────┐ ┌────────┐
│ Memory Playlist │ (2) │ Audio │
│ Sample Program │─── │ File │
└───────┬─────────┘ └────────┘
(1)
┌───────────────┐
│ Media Device │
│ Manager │
└───────┬───────┘
(3)
┌───────────────┐
│Waveform Audio │
│ Media Driver │
└───────┬───────┘
(3)
┌───────────────┐
│ Memory │
│ Playlist │
└───────────────┘
- The Memory Playlist Sample queries the Media
Device Manager using the mciQuerySysValue function to determine whether
the captioning flag is set. If the flag is set, the bell in the primary
window will swing back and forth when a chime occurs.
- The Memory Playlist Sample program initializes
the playlist and loads the audio files into memory.
- When a chime occurs, the Memory Playlist Sample
program calls the Waveform Audio Media Driver through the MDM to interpret
instructions for the playing of three audio files in memory. The clock chimes
are stored in three files: A, B, and C. Depending on the time a chime is
requested, the memory playlist consists of the following:
- At 15 minutes past the hour, the chime plays A.
- At 30 minutes past the hour, the chime plays A+B.
- At 45 minutes past the hour, the chime plays A+B+A.
- On the hour, the chime plays A+B+A+B+ (C x Hour).
[Back: CLOCK - Memory Playlist Sample]
[Next: Playing a Chime]