Playing a Chime

Every time you want to play a chime, open the device you want to play, play it, and close it. The logic for the Memory Playlist Sample implementation of the playlist is outlined in in the following figure.

                                                          (6)
                                                           │
                                                           
┌─────────────────┐     ┌─────────────────┐      ┌─────────────────┐
│  "Play Chime"   │     │Deal with chiming│      │  MM_MCINOTIFY   │
│  push button    │     │     (Open)      │      │ (Play or Open)  │
│                 │     │                 │      │                 │
└────┬────────────┘     └───────┬─────────┘      └─────────┬───────┘
 (1)                        (2)│                       (7)
┌─────────────────┐             │                   ┌─────────────────┐
│Find the nearest │             │                   │ Chiming is done.│
│chime time and   │             │                   │ Stop swinging   │
│play it (Open)   │             │                   │   the bell      │
└────┬────────────┘             │                   └─────────────────┘
     │                          
     │                  ┌─────────────────┐
     │                  │  Find and play  │
     └─────────────────│   the correct   │
                        │      chime      │
                        └───────┬─────────┘
                             (3)│
                                
                        ┌─────────────────┐
                        │  Open Playlist  │
                        │   chime device  │
                        │with MCI_WAIT set│
                        └───────┬─────────┘
                             (4)│
                                
                        ┌─────────────────┐
                        │Set up chime file│
                        │   information   │
                        │                 │
                        └───────┬─────────┘
                             (5)│
                                
                        ┌─────────────────┐
                        │  Play Playlist  │
                        │ with notify set │
                        │                 │
                        └───────┬─────────┘
                                │
                                
                               (6)