About ACM Drivers

An ACM driver typically performs a specific task for the ACM. For example, the MS-ADPCM codec can encode PCM data to MS-ADPCM and decode the resulting MS-ADPCM data. Each driver is small, simple, and easy to write; this makes it relatively simple to extend the audio capabilities of the system at any time. Sample ACM drivers are provided with this DDK.

An ACM driver conforms to the Installable Driver Interface. As such it must export a DriverProc function which supports a number of messages:

The DriverProc function must also support various ACM-specific messages which the ACM sends to the driver to request information about its capabilities or to perform a conversion. These messages are documented in detail in the reference section. Most of the code for responding to these messages is provided in the sample drivers; often, it is only necessary to substitute a few parameters. Generally, only the actual conversion routine (which is called in response to the ACMDM_STREAM_CONVERT message) must be completely rewritten for each driver.

An ACM driver must register itself with the ACM. It does this by putting an entry under the [Drivers32] section of the SYSTEM.INI file. The entry must have the following form:


msacm.alias=filename

In this example, alias must be a unique name. The ACM will only load one codec for each alias. Although not required, it is suggested that ACM codecs use the .ACM filename extension instead of the more typical .DLL extension.

For example, the Microsoft MS-ADPCM codec has the following entry:


msacm.msadpcm=msadp32.acm