## MMPM/2 Device Driver Reference

[prev][next][parent][TOC]

### AUDIO_CAPABILITY (48h) - Example Code

The following example code illustrates an application querying the audio device driver for its capabilities. If the device supports the desired mode , the application saves the information.

      AUDIOCAPS   audiocaps;

      audiocaps.ulSamplingRate = 11025;

      audiocaps.ulBitsPerSample = 16;

      audiocaps.ulChannels = 2;

      audiocaps.ulDataType = DATATYPE_WAVEFORM;

      MAKE1616(&audiocaps);

         rc = DosDevIOCtl(  handle,

                           AUDIO_IOCTL_CAT,

                           AUDIO_CAPABILITY,

                           0,

                           0,

                           0,

                           sizeof (audiocaps),

                           &audiocaps,

                           (PVOID) &ulParmLengthMax);

      if ( audiocaps.ulReturn )

        {

         // process success

         }

      else

         // process failure