Share via


IRTCClient::PreferredAudioDevice

Other versions of this page are also available for the following:

Windows Mobile Not SupportedWindows Embedded CE Supported

8/28/2008

This method sets or gets the preferred audio device for audio capturing or rendering.

Syntax

HRESULT put_PreferredAudioDevice(
  RTC_AUDIO_DEVICE enDevice,
  BSTR bstrDeviceName
);
HRESULT get_PreferredAudioDevice(
  RTC_AUDIO_DEVICE enDevice,
  BSTR* pbstrDeviceName
);

Parameters

  • enDevice
    [in] An RTC_AUDIO_DEVICE enumeration value specifying the audio device type.
  • bstrDeviceName, pbstrDeviceName
    [in, out] The device name.

    On output, this parameter is a pointer to a BSTR that is filled with the device name, or an empty string if there is no entry.

    The method allocates the buffer.

    The caller is responsible for releasing this memory with SysFreeString.

Return Value

This method can return an RTC_E_ constant.

The following table shows an additional possible return value.

Value Description

E_INVALIDARG

No such audio device.

Remarks

The preferred audio device value persists for each user even after the application is shut down.

Requirements

Header rtccore.h, rtccore.idl
Library uuid.lib
Windows Embedded CE Windows CE .NET 4.0 and later

See Also

Reference

IRTCClient
RTC_AUDIO_DEVICE

Other Resources

SysFreeString