📄 mp3enc.h
字号:
////////////////////////////////////////////////////////////////////////
// File Name : MP3Enc.h
// Author : xieyouzhong
// Data : 2004/09/27
// Version : 1.0.0
// Discription : This is a free SDK, You can use it for MPEG audio Encode(MP1, MP2, MP3), if you
// need some new funtion for MPEG audio Encode, Please tell me, if you find any bug
// please tell me too[E_Mail: youzhongxie@126.com].You will get newest version.
// Histoy : 2004/09/27 Finished basic function
// 2004/10/10 Finished record function
///////////////////////////////////////////////////////////////////////////
#ifdef MP3ENC_EXPORTS
#define MP3ENC_API __declspec(dllexport)
#else
#define MP3ENC_API __declspec(dllimport)
#endif
// This class is exported from the MP3Enc.dll
class MP3ENC_API CMP3Enc
{
public:
CMP3Enc(void);
~CMP3Enc(void);
// Function define
public:
///////////////////////// record API /////////////////////////
void SetFileName(char *pFile); // Set Record file name for save record sample file
void StopRec(void); // Stop recording
bool StartRec(void); // Start recording
void PauseRec(void); // Pause recording
int GetLev(); // Get level information
int GetFileSize(); // Get current mp3 file size
int GetRSec(); // Get Record secods
// Set ID3 tag information
void SetArtist(char *pArtist);
void SetAlbum(char *pAlbum);
void SetTitle(char *pTitle);
void SetTrack(char *pTrack);
void SetYear(char *pYear);
void SetComment(char *pcomment);
void SetGenre(char *pGenre);
///////////////////////// MP3 Encode API /////////////////////////
void Wav2MP3(char *pMP3, char *pWav); // Convert Wave file into MP3 file
void Stop(void); // Stop Encoding
int GetFinished(void); // Get Current finished encoding number
void SetChannl(int nChanl); // Set Encode channel, valide date is 0(stereo), 1(jstrereo), 2(DUALCHANNEL), 3(MONO)
void SetSamplRate(int nRate); // Set sample rate, valide date is 48000, 44100 and 32000
// Variable define
public:
// Function define
private:
static DWORD WINAPI EncThread(LPVOID lpPar); // Encode thread
void InitMP3Par(void); // Initialize MP3 Encoder parameter
// Variable define
private:
HANDLE m_hEnc; // MP3 Encode thread handle
DWORD m_dwRet; // MP3 Encode thread return value
HANDLE m_hEven; // Event handle for operate Encode thread
int m_nFinish; // Current finished encoding percent number (0---100)
char m_chWav[MAX_PATH]; // Wave file name for encode
char m_chMP3[MAX_PATH]; // MP3 file name for output
char m_chRecord[MAX_PATH]; // Record sample file name
};
extern MP3ENC_API int nMP3Enc;
MP3ENC_API int fnMP3Enc(void);
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -