## MMPM/2 Device Driver Reference

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

### VSD_SETDATATYPE

Select an item:

    Syntax
    Returns
    Example Code
    Glossary

This subcommand of the VSD_SET command sets the current data type that the device is dealing with.

This command is sent using VSDEntry as follows:

        VSDEntry(hvsd, ulFunc, ulFlags, pRequest)

hvsd (HVSD) Handle to a VSD.

ulFunc (ULONG) Set to VSD_SET.

ulFlags (ULONG) Set to VSD_SETDATATYPE.

pRequest (PVSD_AUDIODATATYPE_PARMS) Input. Pointer to a VSD_AUDIODATATYPE_ PARMS structure.

Note: Every field in the VSD_AUDIODATATYPE_PARMS structure contains a numeric value except for ulOperation. This field contains either VSD_ PRODUCE for recording or VSD_CONSUME for playback. The VSD is responsible for filling in the ulBlockAlignment, ulDataSubType, and ulAverageBytesPerSec fields in the VSD_AUDIODATATYPE_PARMS structure.

The ulFlags field of the VSD_AUDIODATATYPE_PARMS structure contains a flag for each field in the structure that can be set. Every field has a flag except for the ulOperation field. The ulOperation field is valid for every call.

The VSD_AUDIODATATYPE_PARMS structure must contain at least one of the following flags:

VSD_MODE

VSD_CHANNELS

VSD_SAMPLESPERSEC

VSD_OPERATION

VSD_BITSPERSAMPLE

rc (ULONG) Error code indicating success or the type of failure:

VSDERR_SUCCESS The command was successful.