Optional Features of ACM Drivers
An ACM driver must convert data and respond to certain messages. There are also several optional features which an ACM driver may support.
- Custom icon. An ACM driver can provide the ACM with a custom icon. This icon must be compiled into the driver as part of the resource script. In response to the ACMDM_DRIVER_DETAILS message, the driver obtains a handle to the icon by calling the LoadIcon function, and returns the handle to the ACM in the hIcon member of the ACMDRIVERDETAILS structure. The ACM will then use the icon to represent the driver, in situations such as the default About dialog box (see below). If no icon is provided, the ACM will use the default driver icon, and the driver must return NULL in the hIcon member.
- Custom About dialog box. An ACM driver can display a custom About dialog box in response to the ACMDM_DRIVER_ABOUT message. If queried for support, the driver returns MMSYSERR_NOERROR if it supports a custom About dialog box, and MMSYSERR_NOTSUPPORTED if it does not. If the driver responds positively to the query, it must display a driver-provided About dialog box when the ACMDM_DRIVER_ABOUT is passed with a valid window handle. Most ACM drivers should use the default About dialog box rather than providing their own; using the default About dialog box makes the driver code smaller and easier to write. The ACM uses the custom icon (if any) and the strings from the ACMDRIVERDETAILS structure to create an About dialog box which should be satisfactory for most drivers.
- Configuration dialog box. An ACM driver may require configuration data; for example, the IMA ADPCM codec can perform real-time encoding and decoding on very powerful machines, but cannot on less powerful machines. In this case, the driver should allow the user to configure the codec. The driver should return a nonzero response to the DRV_QUERYCONFIGURE message to indicate that a configuration dialog is supported. When the driver receives the DRV_CONFIGURE message, it should display the configuration dialog box. For software codecs, the configuration information should be stored in the HKEY_CURRENT_USER section of the registry to allow each user to configure the driver as desired.