This section describes audio-enabling macros and the high-level service routines designed to simplify writing macros. The service routines are valuable for many applications and are needed for information presentation facility (IPF) support.
The five functions (high-level service API) are: mciPlayFile, mciRecordAudioFile, mciPlayResource, mmioFindElement, and mmioRemoveElement. These functions are located in MCIAPI.DLL. Define INCL_MACHDR and include OS2ME.H in any source that needs access to the high-level service API. The OS/2 Multimedia Programming Reference provides a detailed description of these functions.
Note: These functions are also provided as 16-bit functions. The 16-bit functions include "16" in the function name as follows:
The mciPlayFile function plays a multimedia file or waveaudio bundle element without displaying a device control panel. The mciPlayResource function operates much the same as mciPlayFile, except that it plays the multimedia object that is stored in a program resource and is intended for IPF support, not audio macros. The function loads the resource using DosGetResource, creates a MMIO memory file, and opens the default device to play the memory file.
The mciRecordAudioFile function provides a very simple recorder window allowing the recording of audio annotations. The mciRecordAudioFile function does not return until the recording is complete and the window is closed. This function creates the file if it does not exist. The mciRecordAudioFile records digital audio data from the microphone input of the default waveaudio device. When the file is initially created the settings are PCM, 11 kHz, mono, and the default sample size of the audio adapter in use. All play and record operations are performed from beginning to end.
The mmioRemoveElement function removes an element from a compound file and the mmioFindElement function enumerates elements in a compound file. For more information on the compound file structure, see RIFF Compound File Overview.