Редагувати

Поділитися через


AECMicArray

This sample uses the Core Audio APIs to capture a high-quality voice stream. The sample supports acoustic echo cancellation (AEC) and microphone array processing by using the AEC DMO, also called the Voice capture DSP, provided by Microsoft .

This topic containes the following sections.

Description

This sample demonstrates the following features.

Requirements

Product Version
Windows SDK Windows Vista or later
Visual Studio 2005 (non-express editions)

 

Downloading the Sample

This sample is available in the following locations.

Location Path/URL
Windows SDK \Program Files\Microsoft SDKs\Windows\v7.0\Samples\Multimedia\Audio\AECMicArray\...

 

Building the Sample

To build the AecSDKDemo sample, use the following steps:

  1. Open an SDK command window.

  2. Type cd %MSSDK%\Setup.

  3. Run VCIntegrate.exe.

    From this point forward, command windows will have the proper environment settings to build an application that takes advantage of the SDK.

  4. Build the sample.

Running the Sample

If you build the demo application successfully, an executable file, AecSDKDemo.exe is generated. To run it, type AecSDKDemo in a command window followed by required or optional arguments as described below.

AecSDKDemo -out mic_out.pcm -mod system_mode [-option value]

The following table shows the arguments.

Argument Description
-out Required. Specifies output file name.
-mod Required. Specifies voice capture system mode. Refer to "Configuring the voice capture DMO" section in the sample readme for details.
-feat Optional. Turns feature mode on (1) or off (0).
-ns Optional. Turns noise suppression on (1) or off (0). Feature mode must be on for specifying this.
-agc Optional. Turns digital AGC on (1) or off (0). Feature mode must be on for specifying this.
-cntrclip Optional. Turns center clipping on (1) or off (0). Feature mode must be on for specifying this.
-spkdev Optional. Specifies speaker device index. If not specified, the user will be asked to select.
-micdev Optional. Specifies microphone device index. If not specified, the user will be asked to select.
-duration Optional. Specifies how long the application runs.

 

This sample application does not play any signals. To run the demo properly for AEC enabled modes (mode 0 and 4), users must play some audio signals through the same speaker device specified for the DMO (that is, the device specified by the "-spkdev" option), which simulates the far-end voice in a two-way chatting scenario. Users can use any player to play any audio signals. If there is no active render stream on the selected speaker device, the DMO will fail to process.

SDK Samples That Use the Core Audio APIs