summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Bus/IvyAudioMon/MeterDlg.h80
1 files changed, 80 insertions, 0 deletions
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_)