summaryrefslogtreecommitdiff
path: root/IvyAudioMon/MeterDlg.h
diff options
context:
space:
mode:
authorfcolin2007-02-01 13:29:31 +0000
committerfcolin2007-02-01 13:29:31 +0000
commitafe2e7dfc1388cad991e8d38dda7d648c137aa52 (patch)
tree92bf63d2b2b34a805927aa294c7c51912638f66a /IvyAudioMon/MeterDlg.h
parent0be65f8a110ee9bf5da9c93e0bd5b5b62b3bad0c (diff)
parent04c263c314499e38d64af9d4a1aa5e2b8d9d5ead (diff)
downloadivy-cplusplus-afe2e7dfc1388cad991e8d38dda7d648c137aa52.zip
ivy-cplusplus-afe2e7dfc1388cad991e8d38dda7d648c137aa52.tar.gz
ivy-cplusplus-afe2e7dfc1388cad991e8d38dda7d648c137aa52.tar.bz2
ivy-cplusplus-afe2e7dfc1388cad991e8d38dda7d648c137aa52.tar.xz
modif struct svnwindows@3001
Diffstat (limited to 'IvyAudioMon/MeterDlg.h')
-rw-r--r--IvyAudioMon/MeterDlg.h80
1 files changed, 80 insertions, 0 deletions
diff --git a/IvyAudioMon/MeterDlg.h b/IvyAudioMon/MeterDlg.h
new file mode 100644
index 0000000..dcd007d
--- /dev/null
+++ b/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_)