Pedal Point源码发布及说明(5)

[入库:2005年8月18日] [更新:2007年3月24日]

本文简介:选择自 spanzhang 的 blog

本文属spanzhang原创,其blog地址为:http://blog.csdn.net/spanzhang。引用或转贴请注明出处,谢谢!!

/*/////////////////////////////////////////////////////////////////////

  文件:waverecorder.h

  描述:录音类定义文件

  作者:张友邦

  时间:2004-09-10

  声明:本文件系作者辛苦熬夜的产物,任何人使用本文件请保留本描述文本。

  历史:

/*/////////////////////////////////////////////////////////////////////

#if !defined(_waverecorder_h)
#define _waverecorder_h

#if _msc_ver > 1000
#pragma once
#endif // _msc_ver > 1000

namespace wa
{
//////////////////////////////////////////////////////////////////////

class waverecorder
{
protected:
 hwavein hrecord; //音频设备句柄

 //录音回调函数
 static void callback waveinproc
 (
  hwavein hwi,       //音频设备句柄
  uint umsg,         //消息标识
  dword dwinstance,  //用户定义数据
  dword dwparam1,    //消息参数
  dword dwparam2     //消息参数
 );

 static float waverecorder::constraint(char v);
 static void smooth(char* input, int* output, int length,
  double smoothness = 0.8, int scale = 100);

public:
 waverecorder();
 waverecorder(const waveformatex& waveformatconfig);
 waverecorder(const int& frequency, const int& channels);
 virtual ~waverecorder();

 waveformatex waveformat; //wave格式定义
 typedef enum
 {
  e_status_stoped = 0,
  e_status_started = 1
 } recorderstatus;
 recorderstatus status;     //录音状态
 static float samplecoef;    //采样系数

 //开始
 virtual void start() throw (std::exception);

 //停止
 virtual void stop() throw (std::exception);
};

//////////////////////////////////////////////////////////////////////
};//namespace wa
#endif

本文关键:Pedal Point源码发布及说明(5)
  相关方案
Google
 

本站最佳浏览方式为 分辨率 1024x768 IE 6.0(或更高版本的 IE浏览器)

go top