kinect/codes/Kinect2Sample-master/sample/AudioBeam/app.h

70 lines
1.1 KiB
C
Raw Permalink Normal View History

2024-03-07 09:11:31 +00:00
#ifndef __APP__
#define __APP__
#define _USE_MATH_DEFINES
#include <Windows.h>
#include <Kinect.h>
#include <string>
#include <wrl/client.h>
using namespace Microsoft::WRL;
class Kinect
{
private:
// Sensor
ComPtr<IKinectSensor> kinect;
// Reader
ComPtr<IAudioBeamFrameReader> audioBeamFrameReader;
// Audio Buffer
float beamAngle = 0.f;
float beamAngleConfidence = 0.f;
std::string beamAngleResult;
const float confidenceThreshold = 0.3f;
public:
// Constructor
Kinect();
// Destructor
~Kinect();
// Processing
void run();
private:
// Initialize
void initialize();
// Initialize Sensor
inline void initializeSensor();
// Initialize Audio
inline void initializeAudio();
// Finalize
void finalize();
// Update Data
void update();
// Update Audio
inline void updateAudio();
// Draw Data
void draw();
// Draw Audio
inline void drawAudio();
// Show Data
void show();
// Show Audio
inline void showAudio();
};
#endif // __APP__