📄 sysinfo60rec.h
字号:
#ifndef __CSYSINFO60REC__
#define __CSYSINFO60REC__
#include <e32std.h>
#include <aknnotewrappers.h>
#include <MdaAudioSampleEditor.h>
#include <mda\\client\\utility.h> // for MMdaObjectStateChangeObserver
#include <mda\\common\\resource.h> // for TMdaDesClipLocation
#include <mda\\common\\audio.h> // for TMdaClipFormat
//#include "audioadapter.h"
//CONSTANTS
const TInt KSampleRate = 8000;
const TInt KChannels = 1;
_LIT(KRecorderFile, "C:\\System\\Apps\\SysInfo60\\rec.wav");
//FORWARD DECLARATIONS
/*!
@class CSYSINFO60Rec
@discussion An instance of class CSYSINFO60Rec is an adapter object for the CMdaAudioRecorderUtility class.
*/
//class CSYSINFO60Rec : public CBase, public MAudioAdapter, public MMdaObjectStateChangeObserver
class CSYSINFO60Rec : public CBase, public MMdaObjectStateChangeObserver
{
public:
/*!
@function NewL
@discussion Create a CSYSINFO60Rec object using two phase construction,
and return a pointer to the created object
@result pointer to new object
*/
static CSYSINFO60Rec* NewL(void);
/*!
@function NewLC
@discussion Create a CSYSINFO60Rec object using two phase construction,
and return a pointer to the created object
@result pointer to new object
*/
static CSYSINFO60Rec* NewLC(void);
/*!
@function ~CSYSINFO60Rec
@discussion Destroy the object and release all memory objects
*/
~CSYSINFO60Rec();
public: // from MAudioAdapter
/*!
@function PlayL
@discussion Begin playback of the audio sample.
*/
//void PlayL();
/*!
@function StopL
@discussion Stop playback or recording of the audio sample.
Note that this implementation of the virtual function does not leave.
*/
//void StopL();
/*!
@function RecordL
@discussion Record using the audio utility.
*/
//void RecordL();
TInt MaxGain();
TInt RecTime();
TInt MaxVol();
void OpenL();
void Close();
public: // from MMdaObjectStateChangeObserver
/*!
@function MoscoStateChangeEvent
@discussion Handle the change of state of an audio recorder utility.
@param aObject The audio sample object that has changed state
@param aPreviousState The state before the change
@aCurrentState The state after the change
@aErrorCode if not KErrNone, that error that caused the state change
*/
void MoscoStateChangeEvent(CBase* aObject, TInt aPreviousState, TInt aCurrentState, TInt aErrorCode);
private:
/*!
@function CSYSINFO60Rec
@discussion Perform the first phase of two phase construction
*/
CSYSINFO60Rec(void);
/*!
@function ConstructL
@discussion Perform the second phase construction of a CRecorderAdapter object
*/
void ConstructL();
private:
/** The audio recorder utility object. */
CMdaAudioRecorderUtility* iMdaAudioRecorderUtility;
TMdaAudioDataSettings iAudioSettings;
TMdaFileClipLocation iFileClipLocation;
TMdaWavClipFormat iWavFormat;
TMdaPcmWavCodec iPcmCodec;
/** Reference to the application's UI object. */
// CSYSINFO60AppUi& iAppUi;
};
#endif // __CSYSINFO60REC__
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -