Audio Capture and Render APIs for native code for Windows Phone
July 21, 2014
To enable the capturing and rendering of audio from native code, Windows Phone 8 supports a subset of the WASAPI interfaces that are available on the desktop. Four additional audio APIs that are specific to the phone are also provided to enable this scenario. Capturing and rendering audio from managed code, such as playing a sound effect in a typical XAML-based application does not require the use of these APIs. For more information on other ways to play and capture audio on Windows Phone, see Media for Windows Phone.
Supported WASAPI interfaces
Windows Phone 8 supports the following WASAPI interfaces:
IAudioClient2 – This interface is supported on the phone with a few important functional differences from the desktop version of the interface.
The phone does not support exclusive mode. Calling IAudioClient2::Initialize with the ShareMode parameter set to AUDCLNT_SHAREMODE_EXCLUSIVE will fail and return AUDCLNT_E_EXCLUSIVE_MODE_NOT_ALLOWED.
The phone does not support offloading the audio stream. Calling SetClientProperties and passing in an AudioClientProperties structure with the bIsOffload field set to TRUE will fail and return AUDCLNT_E_ENDPOINT_OFFLOAD_NOT_CAPABLE.
Unsupported WASAPI interfaces
Windows Phone 8 does not support the following WASAPI interfaces:
Additional Audio Capture and Render APIs
The following APIs are provided to support audio capture and render from native code on Windows Phone 8.