• 大小: 141KB
    文件类型: .zip
    金币: 1
    下载: 0 次
    发布日期: 2021-05-26
  • 语言: C/C++
  • 标签: C++  PCM  录音  双缓存  MFC  

资源简介

C++PCM音频格式录音(双缓存MFC版本),详情见博客,有问题到博客留言,这边不会推送,很少会看到 http://blog.csdn.net/weixinhum/article/details/76158998

资源截图

代码片段和文件信息


// PCMCollectProgramDouBuf.cpp : 定义应用程序的类行为。
//

#include “stdafx.h“
#include “PCMCollectProgramDouBuf.h“
#include “PCMCollectProgramDouBufDlg.h“

#ifdef _DEBUG
#define new DEBUG_NEW
#endif


// CPCMCollectProgramDouBufApp

BEGIN_MESSAGE_MAP(CPCMCollectProgramDouBufApp CWinApp)
ON_COMMAND(ID_HELP &CWinApp::onhelp)
END_MESSAGE_MAP()


// CPCMCollectProgramDouBufApp 构造

CPCMCollectProgramDouBufApp::CPCMCollectProgramDouBufApp()
{
// 支持重新启动管理器
m_dwRestartManagerSupportFlags = AFX_RESTART_MANAGER_SUPPORT_RESTART;

// TODO: 在此处添加构造代码,
// 将所有重要的初始化放置在 InitInstance 中
}


// 唯一的一个 CPCMCollectProgramDouBufApp 对象

CPCMCollectProgramDouBufApp theApp;


// CPCMCollectProgramDouBufApp 初始化

BOOL CPCMCollectProgramDouBufApp::InitInstance()
{
// 如果一个运行在 Windows XP 上的应用程序清单指定要
// 使用 ComCtl32.dll 版本 6 或更高版本来启用可视化方式,
//则需要 InitCommonControlsEx()。  否则,将无法创建窗口。
INITCOMMONCONTROLSEX InitCtrls;
InitCtrls.dwSize = sizeof(InitCtrls);
// 将它设置为包括所有要在应用程序中使用的
// 公共控件类。
InitCtrls.dwICC = ICC_WIN95_CLASSES;
InitCommonControlsEx(&InitCtrls);

CWinApp::InitInstance();


AfxEnableControlContainer();

// 创建 shell 管理器,以防对话框包含
// 任何 shell 树视图控件或 shell 列表视图控件。
CShellManager *pShellManager = new CShellManager;

// 激活“Windows Native”视觉管理器,以便在 MFC 控件中启用主题
CMFCVisualManager::SetDefaultManager(RUNTIME_CLASS(CMFCVisualManagerWindows));

// 标准初始化
// 如果未使用这些功能并希望减小
// 最终可执行文件的大小,则应移除下列
// 不需要的特定初始化例程
// 更改用于存储设置的注册表项
// TODO: 应适当修改该字符串,
// 例如修改为公司或组织名
SetRegistryKey(_T(“应用程序向导生成的本地应用程序“));

CPCMCollectProgramDouBufDlg dlg;
m_pMainWnd = &dlg;
INT_PTR nResponse = dlg.DoModal();
if (nResponse == IDOK)
{
// TODO: 在此放置处理何时用
//  “确定”来关闭对话框的代码
}
else if (nResponse == IDCANCEL)
{
// TODO: 在此放置处理何时用
//  “取消”来关闭对话框的代码
}
else if (nResponse == -1)
{
TRACE(traceAppMsg 0 “警告: 对话框创建失败,应用程序将意外终止。\n“);
TRACE(traceAppMsg 0 “警告: 如果您在对话框上使用 MFC 控件,则无法 #define _AFX_NO_MFC_CONTROLS_IN_DIALOGS。\n“);
}

// 删除上面创建的 shell 管理器。
if (pShellManager != NULL)
{
delete pShellManager;
}

#ifndef _AFXDLL
ControlBarCleanUp();
#endif

// 由于对话框已关闭,所以将返回 FALSE 以便退出应用程序,
//  而不是启动应用程序的消息泵。
return FALSE;
}


 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----
     目录           0  2017-07-26 18:21  PCMCollectProgramDouBuf\
     目录           0  2017-07-25 22:26  PCMCollectProgramDouBuf\.vs\
     目录           0  2017-07-25 22:26  PCMCollectProgramDouBuf\.vs\PCMCollectProgramDouBuf\
     目录           0  2017-07-25 22:26  PCMCollectProgramDouBuf\.vs\PCMCollectProgramDouBuf\v14\
     文件       35840  2017-07-26 18:21  PCMCollectProgramDouBuf\.vs\PCMCollectProgramDouBuf\v14\.suo
     目录           0  2017-07-26 18:21  PCMCollectProgramDouBuf\Debug\
     目录           0  2017-07-26 18:21  PCMCollectProgramDouBuf\ipch\
     目录           0  2017-07-26 18:21  PCMCollectProgramDouBuf\PCMCollectProgramDouBuf\
     文件        1351  2017-07-25 22:26  PCMCollectProgramDouBuf\PCMCollectProgramDouBuf.sln
     目录           0  2017-07-26 18:21  PCMCollectProgramDouBuf\PCMCollectProgramDouBuf\Debug\
     文件      109224  2017-07-26 18:17  PCMCollectProgramDouBuf\PCMCollectProgramDouBuf\PCMCollectProgramDouBuf.aps
     文件        2641  2017-07-25 22:26  PCMCollectProgramDouBuf\PCMCollectProgramDouBuf\PCMCollectProgramDouBuf.cpp
     文件         545  2017-07-25 22:26  PCMCollectProgramDouBuf\PCMCollectProgramDouBuf\PCMCollectProgramDouBuf.h
     文件       11070  2017-07-26 18:17  PCMCollectProgramDouBuf\PCMCollectProgramDouBuf\PCMCollectProgramDouBuf.rc
     文件       10628  2017-07-25 23:52  PCMCollectProgramDouBuf\PCMCollectProgramDouBuf\PCMCollectProgramDouBuf.vcxproj
     文件        2167  2017-07-25 22:26  PCMCollectProgramDouBuf\PCMCollectProgramDouBuf\PCMCollectProgramDouBuf.vcxproj.filters
     文件        6471  2017-07-26 18:21  PCMCollectProgramDouBuf\PCMCollectProgramDouBuf\PCMCollectProgramDouBufDlg.cpp
     文件        1238  2017-07-26 17:55  PCMCollectProgramDouBuf\PCMCollectProgramDouBuf\PCMCollectProgramDouBufDlg.h
     文件        4165  2017-07-25 22:26  PCMCollectProgramDouBuf\PCMCollectProgramDouBuf\ReadMe.txt
     目录           0  2017-07-25 22:26  PCMCollectProgramDouBuf\PCMCollectProgramDouBuf\res\
     文件        1546  2017-07-25 23:39  PCMCollectProgramDouBuf\PCMCollectProgramDouBuf\resource.h
     文件       67777  2015-09-20 17:20  PCMCollectProgramDouBuf\PCMCollectProgramDouBuf\res\PCMCollectProgramDouBuf.ico
     文件         702  2017-07-25 22:26  PCMCollectProgramDouBuf\PCMCollectProgramDouBuf\res\PCMCollectProgramDouBuf.rc2
     文件         156  2017-07-25 22:26  PCMCollectProgramDouBuf\PCMCollectProgramDouBuf\stdafx.cpp
     文件        1578  2017-07-25 22:26  PCMCollectProgramDouBuf\PCMCollectProgramDouBuf\stdafx.h
     文件         240  2017-07-25 22:26  PCMCollectProgramDouBuf\PCMCollectProgramDouBuf\targetver.h

评论

共有 条评论