Last reviewed: 3/23/2024 9:04:06 AM

Recording Audio

The KinesicsKit movement management class KinesicsKit is designed to provide you a lot of flexiblity and minimize the programming necessary to manage the color, depth, body, and audio data from a Microsoft Kinect sensor.

To start capturing data, simply use the Start method to turn on the sensor cameras. To stop capturing data, simply use the Stop method to turn off the sensor cameras.


// Turn the sensor on
_Sensor.Start();
// Turn the sensor off
_Sensor.Stop();
    

// Turn the sensor on
_Sensor->Start();
// Turn the sensor off
_Sensor->Stop();
    

// Turn the sensor on
_Sensor->Start();
// Turn the sensor off
_Sensor->Stop();
    

// Turn the sensor on
_Sensor.Start();
// Turn the sensor off
_Sensor.Stop();
    

// Turn the sensor on
_Sensor.start();
// Turn the sensor off
_Sensor.stop();
    

' Turn the sensor on
_Sensor.Start()
' Turn the sensor off
_Sensor.Stop()
    

To record audio using the sensor microphone, simply use the StartRecording method to start capturing audio. To stop capturing audio, simply use the StopRecording method.


string path = Directory.GetCurrentDirectory();
// Append path terminator
path += "\\";
// Start audio source and persist to a file. Have KinesicsKit generate a unique file name.
_Sensor.StartRecording((int)ChantSensorStream.CSSAudio, path);
// Stop audio source
_Sensor.StopRecording();
    

wchar_t path[MAX_PATH];
GetCurrentDirectory(MAX_PATH, path);
int length = wcslen(path);
// Append path terminator
path[length] = L'\\';
path[length + 1] = L'\0';
// Start audio source and persist to a file. Have KinesicsKit generate a unique file name.
_Sensor->StartRecording(CSSAudio, path,);
// Stop audio source
_Sensor->StopRecording();
    

wchar_t path[MAX_PATH];
GetCurrentDirectoryW(MAX_PATH, path);
int length = wcslen(path);
// Append path terminator
path[length] = L'\\';
path[length + 1] = L'\0';
// Start audio source and persist to a file. Have KinesicsKit generate a unique file name.
_Sensor->StartRecording(CSSAudio, String(path));
// Stop audio source
_Sensor->StopRecording();
    

var
path: array [0..MAX_PATH] of WideChar;
pathLength: Integer;
begin
GetCurrentDirectoryW(MAX_PATH, path);
pathLength := Length(path);
// Append path terminator
path[pathLength] := WideChar('\');
path[pathLength + 1] := WideChar('0');
// Start audio source and persist to a file. Have KinesicsKit generate a unique file name.
_Sensor.StartRecording(CSSAudio, string(path));
end;
// Stop audio source
_Sensor.StopRecording(0);
    

String path = new File(".").getAbsolutePath(); 
// Append path terminator
path += "\\";
// Start audio source and persist to a file. Have KinesicsKit generate a unique file name.
_Sensor.startRecording(ChantSensorStream.CSSAudio, path);
// Stop audio source
_Sensor.stopRecording();
    

Dim path as String
path = Directory.GetCurrentDirectory()
' Append path terminator
path = path + "\"
' Start audio source and persist to a file. Have KinesicsKit generate a unique file name.
_Sensor.StartRecording(ChantSensorStream.CSSAudio, path)
// Stop audio source
_Sensor.StopRecording()