audiorecorder.h

来自「电话录音」· C头文件 代码 · 共 61 行

H
61
字号

#ifndef AUDIORECORDER_H__
#define AUDIORECORDER_H__
 
#include <MdaAudioSampleEditor.h>
 
#include <Mda\Client\Utility.h>
 
#include "ExampleTimer.h"
 
//This code has been corrected by Michel David. At least, it now compiles!!
 
class MExmapleRecStateObserver
{
	public:
		virtual void StateUpdate(CMdaAudioClipUtility::TState aState, TInt aPosition, TInt aDuration)=0;
};
 
 
class CAudioRecorder : public CBase, public MMdaObjectStateChangeObserver
,public MExampleTimerNotify
 {
public:
    static CAudioRecorder* NewL(MExmapleRecStateObserver& aObserver);
    static CAudioRecorder* NewLC(MExmapleRecStateObserver& aObserver);
     ~CAudioRecorder();
public:  // public functions 
	void RecordL(const TDesC& aFileName);
	void StopL(void);
	void SetVolume(TInt& aVolume);
private:// interna functions
	void ReportStateAndTime(void);
    void ConstructL();
    CAudioRecorder(MExmapleRecStateObserver& aObserver);
protected: // from MMdaObjectStateChangeObserver & MExampleTimerNotify
	void MoscoStateChangeEvent(CBase* aObject, TInt aPreviousState, TInt aCurrentState, TInt aErrorCode);
	void TimerExpired(TInt aError);	
private:
	MExmapleRecStateObserver&		iObserver;
	CMdaAudioRecorderUtility* 		iRecorderUtility;
    TInt 							iVolume;
    TMdaWavClipFormat				iMdaWavClipFormat;
    TMdaFileClipLocation 			iCurrentFile;
    CExampleTimer*					iExampleTimer;
    TMdaClipFormat* 				iFormat;
	TMdaPackage* 					iCodec;
	TMdaAudioDataSettings* 			iAudioDataSettings;
};
 
 
 
 
#endif /*AUDIORECORDER_H__*/





// End of file

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?