www.pudn.com > 语音语谱图与基频.rar > speechView.h
// speechView.h : interface of the CSpeechView class
//
/////////////////////////////////////////////////////////////////////////////
#if !defined(AFX_SPEECHVIEW_H__3778BF75_25C3_4668_9913_F37BFD803139__INCLUDED_)
#define AFX_SPEECHVIEW_H__3778BF75_25C3_4668_9913_F37BFD803139__INCLUDED_
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
class CSpeechView : public CView
{
protected: // create from serialization only
CSpeechView();
DECLARE_DYNCREATE(CSpeechView)
// Attributes
public:
CSpeechDoc* GetDocument();
// Operations
public:
// Overrides
// ClassWizard generated virtual function overrides
//{{AFX_VIRTUAL(CSpeechView)
public:
virtual void OnDraw(CDC* pDC); // overridden to draw this view
virtual BOOL PreCreateWindow(CREATESTRUCT& cs);
protected:
//}}AFX_VIRTUAL
// Implementation
public:
void read(const CString& filename,double * data);
double * m_fftout;
void H(short *data, int len, int step_size, int steps);
void fundamental_frequency(short *data);
void hamming_window(fftw_complex *in, int win_size);
virtual ~CSpeechView();
#ifdef _DEBUG
virtual void AssertValid() const;
virtual void Dump(CDumpContext& dc) const;
#endif
protected:
unsigned long m_nWaveLength;
// Generated message map functions
protected:
CString m_name;
int isgood(double *power);
int m_flag;
long Numzheng;//帧数
//语音文件的振幅,以char型保存,处理时转化为short
char * m_pWaveBuffer;
CString m_filepath;
//读取文件函数
BOOL ReadFile(const CString & File);
//{{AFX_MSG(CSpeechView)
afx_msg void OnFileOpen();
//}}AFX_MSG
DECLARE_MESSAGE_MAP()
};
#ifndef _DEBUG // debug version in speechView.cpp
inline CSpeechDoc* CSpeechView::GetDocument()
{ return (CSpeechDoc*)m_pDocument; }
#endif
/////////////////////////////////////////////////////////////////////////////
//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.
#endif // !defined(AFX_SPEECHVIEW_H__3778BF75_25C3_4668_9913_F37BFD803139__INCLUDED_)