📄 sound.h
字号:
/*
//
// INTEL CORPORATION PROPRIETARY INFORMATION
// This software is supplied under the terms of a license agreement or
// nondisclosure agreement with Intel Corporation and may not be copied
// or disclosed except in accordance with the terms of that agreement.
// Copyright(c) 1999-2006 Intel Corporation. All Rights Reserved.
//
// Intel(R) Integrated Performance Primitives Speech Processing Sample for Windows*
//
// By downloading and installing this sample, you hereby agree that the
// accompanying Materials are being provided to you under the terms and
// conditions of the End User License Agreement for the Intel(R) Integrated
// Performance Primitives product previously accepted by you. Please refer
// to the file ippEULA.rtf located in the root directory of your Intel(R) IPP
// product installation for more information.
//
*/
#ifndef aaaaSoundaaaa
#define aaaaSoundaaaa
#include <mmsystem.h>
#include <windows.h>
#include <ipps.h>
#define BLOCKSIZE 12000
class Sound{
int m_nChannels;
int m_nSamplesPerSec;
WORD m_wBitsPerSample;
public:
int m_nSampleRate;
WAVEHDR m_wavehdr1;
WAVEHDR m_wavehdr2;
WAVEHDR m_wavehdr3;
WAVEHDR m_wavehdr4;
HWAVEIN m_hWaveIn;
Ipp8u *m_pBufferOut;
Ipp8u *m_pBuffer1;
Ipp8u *m_pBuffer2;
Ipp8u *m_pBuffer3;
Ipp8u *m_pBuffer4;
int m_nfirst;
int m_nSizeBigBuffer;
int m_nCountSample;
int m_nEndBuffer;
bool m_bReset;
Sound(int SampleRate);
~Sound();
MMRESULT OpenSoundDevice(void);
MMRESULT RecordSound(void);
MMRESULT StopRecordSound(void);
short *GetDataBuffer(int *SizeBuffer);
};
#endif
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -