⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 display.h

📁 声卡的数据分析,用于采集声卡的数据进行分析
💻 H
字号:
#if !defined DISPLAY_H
#define DISPLAY_H

#include "active.h"
#include "fft.h"
#include "smartptrs.h"

class ViewWave;
class ViewFreq;

class Painter: public ActiveObject
{
public:
    Painter (
        HWND hwnd,
        ViewWave& viewWave,
        ViewFreq& viewFreq,
        int samplesPerBuf, 
        int samplesPerSec,
        int fftPoints);

    bool ReInit (
        int samplesPerBuf, 
        int samplesPerSec, 
        int fftPoints,
        int bitsPerSample);

    bool Start ();
    void Stop ();

    int HzToPoint (int hz)
    { 
        Lock lock (_mutex);
        return _pFftTransformer->HzToPoint (hz); 
    }

    int Points () 
    { 
        Lock lock (_mutex);
        return _pFftTransformer->Points (); 
    }

private:
    void InitThread () {}
    void Run ();
    void FlushThread ();

    void LokWaveInData ();

    ViewWave   &_viewWave;
    ViewFreq   &_viewFreq;

    int         _samplesPerBuf;
    int         _samplesPerSecond;
    int         _fftPoints;
    int         _bitsPerSample;

    HWND        _hwnd;

    Mutex       _mutex;
    Event       _event;

    PtrRecorder _pRecorder;
    PtrFft      _pFftTransformer;
};

#endif

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -