Program Flow
The following figure illustrates how the Audio Recorder Sample program interfaces
with the Media Device Manager (MDM). Source code for the Audio Recorder
Sample is located in the \TOOLKIT\SAMPLES\MM\RECORDER subdirectory.
┌───────────────┐
│ Audio Recorder│
│ Sample │
└──┬────────┬───┘
(1) (2)
┌─────────────────┐
│ Media Device │
│ Manager │
└┬───┬────────┬───┘
(1) (2) (2)
┌──────────┐┌──────────┐
│Wave Audio││ Amp-Mixer│
│ MCD ││ MCD │
└──────────┘└──────────┘
- Upon initialization, the Audio Recorder Sample
program issues an MCI_GETDEVCAPS command, with the MCI_GETDEVCAPS_EXTENDED
flag set. The Audio Recorder Sample uses the device capability information
that is returned to disable any options in the Audio Recorder Sample menus
that do not apply to the installed audio device.
- When you select Record, the Audio Recorder
Sample program checks all of the menu settings and sets up the device accordingly.
The Audio Recorder Sample issues an MCI_SET command to the Waveform Audio
Media Driver to set up the bits per sample, samples per second, and channels
of the recording. The sample also issues an MCI_CONNECTOR command to the
Waveform Audio Media Driver to set up the input source. It gets the device
ID of the Amp-Mixer Media Driver and issues an MCI_SET command to that device
to set up monitor input and input level. It also sends an MCI_SET command
to the Amp-Mixer Media Driver to set the input level of the recording. Finally,
the Audio Recorder Sample sends an MCI_RECORD command to the waveaudio device
to begin recording.
[Back: RECORDER - Audio Recorder Sample]
[Next: TUNER - TV Tuner Sample]