MFPKEY_WMAAECMA_DEVICE_INDEXES Property

banner art

Specifies which audio devices the Voice Capture DSP uses for capturing and rendering audio.

Constant for IPropertyBag

Available only by using IPropertyStore.

Data Type

VT_I4

Default Value

(-1, -1).

Remarks

Set this property if you are using the DSP in source mode. The DSP ignores this property in filter mode.

The value of the property is two 16-bit WORDs packed into a DWORD. The upper 16 bits specify the audio rendering device (typically a speaker), and the lower 16 bits specify the capture device (typically a microphone). Each device is specified as an index into the audio device collection. If the index is -1, the default device is used.

The device index corresponds to the collection index used in the IMMDeviceCollection interface. The IMMDeviceCollection interface is documented in the Core Audio API documentation. The application must play the far-end voice through the selected rendering device. (The far-end voice is the voice of the person on the other end of the telephone line, which is played through the speaker on the user's computer.) If the selected rendering device does not have an active stream, the DSP cannot process any output.

The default value of this property is (-1, -1).

The following example shows how to initialize the PROPVARIANT for this property.

int iSpeakerIndex = -1;
int iMicrophoneIndex = -1;

// Find the device indexes to initialize iSpeakerIndex and 
// iMicrophone index (not shown).

PROPVARIANT varDeviceIndexes;
PropVariantInit(&varDeviceIndexes);
varDeviceIndexes.vt = VT_I4;
varDeviceIndexes.lVal = (unsigned long)(iSpeakerIndex << 16) + 
    (unsigned long)(0x0000ffff & iMicrophoneIndex);

Applies To

Requirements

Client: Requires Windows Vista or Windows XP.

Header: Include wmcodecdsp.h.

See Also