Audio Explorer-D2D C++ Sample
Kinect for Windows 1.5, 1.6, 1.7, 1.8
Overview
When you run this sample, you see the following:
- A visualizer that displays the audio wave.
- An arrow and a semicircular indicator bar. The arrow indicates the direction of the most recent sound source detection. The indicator bar shows the confidence level of the sound source detection; the shaded area in the bar is smaller and darker when confidence is higher, and is larger and lighter when confidence is lower.
There are additional controls for:
Displaying the audio signal as an oscilloscope readout or as a Fast Fourier transform.
Selecting the sensor up as a single microphone, or a microphone array (with or without automatic listening direction and AEC).
Enabling or disabling echo suppression.
Record audio data at the following path:
C:\Users\your_user_name\Music\KinectAudio-HH-MM-SS.wav
where:
- your_user_name will be filled in with your user name.
- HH-MM-SS is the timestamp (the time audio was created) in hours, minutes, and seconds.
The Sample Uses the Following APIs | To Do This |
---|---|
NuiGetSensorCount function | Get the number of sensors that are ready for use. |
NuiCreateSensorByIndex function and INuiSensor interface | Create an interface that represents a connected sensor. |
INuiSensor::NuiStatus method | Check the sensor status to see if the sensor is connected. |
INuiSensor::NuiInitialize method | Initialize the sensor to stream out audio data. |
INuiSensor::NuiGetAudioSource method | Get the microphone array. |
IPropertyStore::SetValue method | Add key/value pairs to configure the behavior of the DMO. |
INuiSensor::Release method | Release the sensor. |
INuiAudioBeam::GetBeam method | Get the beam direction to understand the preferred direction for audio. |
INuiAudioBeam::GetPosition method | Get the position of an audio source. |
INuiSensor::NuiShutdown method | Shut down the Sensor. |
For more information about audio, see Capturing Audio Data in C#.
To run a sample you must have the Kinect for Windows SDK installed. To compile a sample, you must have the developer toolkit installed. The latest SDK and developer toolkit are available on the developer download page. If you need help installing the toolkit, look on this page: To Install the SDK and Toolkit. The toolkit includes a sample browser, which you can use to launch a sample or download it to your machine. To open the sample browser, click Start > All Programs > Kinect for Windows SDK [version number] > Developer Toolkit Browser.
If you need help loading a sample in Visual Studio or using Visual Studio to compile, run, or debug, see Opening, Building, and Running Samples in Visual Studio.