📄 mp3decodeengine.h
字号:
/*
This file is part of MP3DecodeDLL for Symbian.
MP3DecodeDLL for Symbian
Copyright (C) 2004 Denis Mingulov <denis@mingulov.com>
MP3DecodeDLL for Symbian is free software; you can redistribute
it and/or modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2 of
the License, or (at your option) any later version.
MP3DecodeDLL for Symbian is distributed in the hope that it
will be useful, but WITHOUT ANY WARRANTY; without even the implied
warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with MP3DecodeDLL for Symbian; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#ifndef MP3DECODEENGINE_H
#define MP3DECODEENGINE_H
#include <e32std.h>
#include <e32base.h>
class CMP3Decode;
class RFs;
//class MMP3DecodeNotifier;
enum TMP3DecodeEngineState
{
EDoNothing = 0,
EOpeningFile,
EOpenComplete,
EDecoding,
EPause,
EDecodeComplete
};
/*const TInt KDefaultInBufferSize = 4000;
const TInt KDefaultOutBufferSize = 8000;
const TInt KDefaultMaximumBuffers = 16;
*/
class CMP3DecodeEngine : public CBase
{
public:
IMPORT_C static CMP3DecodeEngine* NewL();
IMPORT_C static CMP3DecodeEngine* NewLC();
virtual ~CMP3DecodeEngine();
IMPORT_C TInt OpenFile(RFs& aFileServer, const TDesC &aFileName);//, /*TDes &aBuffer, */MMP3DecodeNotifier *aNotifier);
IMPORT_C TInt CloseFile();
IMPORT_C TInt SetEqualizer(TInt aEq60, TInt aEq170, TInt aEq310, TInt aEq600, TInt aEq1K, TInt aEq3K, TInt aEq6K, TInt aEq12K, TInt aEq14K, TInt aEq16K, TInt aEqZero, TInt aEqDiv);
IMPORT_C TInt SetResampleRate(TInt aResampleRate);
IMPORT_C TInt DecodeOneFrame(TDes &aBuffer);
IMPORT_C TInt DecodeStart();
IMPORT_C TInt DecodeStop();
IMPORT_C const TDesC& GetBuffer();
IMPORT_C TMP3DecodeEngineState GetState();
IMPORT_C TInt GetFileLength();
IMPORT_C TInt GetFilePosition();
protected:
// void DoCancel();
// void RunL();
// virtual void RunError();
private:
CMP3DecodeEngine();
void ConstructL();
void ChangeState (TMP3DecodeEngineState aState);
TFileName strFileName;
RFs *iFileSession;
TMP3DecodeEngineState iState;
/*
TInt iEqualizer[10]; // 60, 170, 310, 600, 1K, 3K, 6K, 12K, 14K, 16K
TInt iEqualizerDiv;
TInt iEqualizerZero;
*/
TBool bFileOpened;
// TDes *iBuffer;
// HBufC *iBuffer;
CMP3Decode *iMP3Decode;
// MMP3DecodeNotifier *iNotifier;
};
#endif
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -