Configuring ACM Drivers

It is often necessary for ACM drivers to obtain and store configuration parameters. A driver requiring configuration parameters must display a configuration dialog box when its DriverProc function receives a DRV_CONFIGURE message. The dialog box must allow a user to specify configuration parameter values. Optionally, the dialog box can allow the user to select automatic configuration. If your driver provides this automatic configuration option, it must attempt to automatically provide values for all configuration parameters. Two of the sample ACM drivers, the IMA ADPCM Audio Codec and the Microsoft GSM 6.10 Audio Codec, provide automatic configuration.

An ACM driver’s DriverProc function must respond to DRV_QUERYCONFIGURE messages by indicating whether or not the driver provides a configuration dialog box.

A separate copy of an ACM driver’s configuration parameters should be saved for each user. To accomplish this, the driver should store configuration parameters in the registry, under the path HKEY_CURRENT_USER\Software\Microsoft\Multimedia\msacm.alias.

For a description of alias, see Installing ACM Drivers. (Use the msacm.alias naming scheme even for local drivers, which are not installed.) Since configuration parameters should be stored for each user, the parameters should be obtained and stored when the driver receives a DRV_OPEN message.

It is important for your driver to provide default values for all configuration parameters. In some circumstances, such as the playing of system sounds, there is no user context, so attempts to reference a registry path under HKEY_CURRENT_USER will fail. In such a case your driver must use its default values.