From 38e92c6ca389d44261a1d5a31aac0a86d826e532 Mon Sep 17 00:00:00 2001 From: fcolin Date: Thu, 1 Feb 2007 13:06:37 +0000 Subject: Utilisateur : Fcolin Date : 10/02/04 Heure : 17:06 Créé Commentaire: (vss 1) --- Bus/IvyAudioMon/MeterDlg.h | 80 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 80 insertions(+) create mode 100644 Bus/IvyAudioMon/MeterDlg.h (limited to 'Bus/IvyAudioMon') diff --git a/Bus/IvyAudioMon/MeterDlg.h b/Bus/IvyAudioMon/MeterDlg.h new file mode 100644 index 0000000..dcd007d --- /dev/null +++ b/Bus/IvyAudioMon/MeterDlg.h @@ -0,0 +1,80 @@ +// MeterDlg.h : header file +// + +#include "afxcmn.h" +#if !defined(AFX_METERDLG_H__3A48D837_F4B7_11D1_9F80_006008984DF6__INCLUDED_) +#define AFX_METERDLG_H__3A48D837_F4B7_11D1_9F80_006008984DF6__INCLUDED_ + +#if _MSC_VER >= 1000 +#pragma once +#endif // _MSC_VER >= 1000 +#include "Ivy.h" + +#define BUFSIZE 800 // size of audio in buffer + +///////////////////////////////////////////////////////////////////////////// +// CMeterDlg dialog + +class CMeterDlg : public CDialog, public IvyApplicationCallback +{ +// Construction +public: + CMeterDlg(CWnd* pParent = NULL); // standard constructor + +// Dialog Data + //{{AFX_DATA(CMeterDlg) + enum { IDD = IDD_METER_DIALOG }; + CProgressCtrl m_ctrlProgress; + CProgressCtrl m_ctrlPeekValue; + //}}AFX_DATA + + // ClassWizard generated virtual function overrides + //{{AFX_VIRTUAL(CMeterDlg) + protected: + virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support + //}}AFX_VIRTUAL + +// Implementation +protected: + HICON m_hIcon; + + // Generated message map functions + //{{AFX_MSG(CMeterDlg) + virtual BOOL OnInitDialog(); + afx_msg void OnDestroy(); + afx_msg void OnSysCommand(UINT nID, LPARAM lParam); + afx_msg void OnPaint(); + afx_msg HCURSOR OnQueryDragIcon(); + virtual void OnOK( ); + + //}}AFX_MSG + DECLARE_MESSAGE_MAP() + +private: + + + void openWaveDev(); + static void CALLBACK recordCallBack(HWAVEIN hWaveIn, UINT uMsg, DWORD p1, DWORD p2, DWORD p3); + void CALLBACK recordCB(HWAVEIN hWaveIn, UINT uMsg, DWORD p1, DWORD p2, DWORD p3); + HANDLE recordDone; // event of audio input completion + HWAVEIN hWaveIn; // onput WAVE audio device handle + char inbuf[BUFSIZE]; // WAVE input data buffer area + WAVEHDR WaveHeader; + long nb_buffers; + float peekValue; + float lastValue; + float m_seuil; + + Ivy *bus; + void WriteMessage(const char * format, ...); + void OnApplicationConnected( IvyApplication *app ); + void OnApplicationDisconnected( IvyApplication *app ); + void OnDirectMessage( IvyApplication *app, int id, const char *arg ); + void SendIvyFile( const CString & strFileName ); + CString m_busnumber; +}; + +//{{AFX_INSERT_LOCATION}} +// Microsoft Developer Studio will insert additional declarations immediately before the previous line. + +#endif // !defined(AFX_METERDLG_H__3A48D837_F4B7_11D1_9F80_006008984DF6__INCLUDED_) -- cgit v1.1