mpafile.h

来自「获取mp3信息, Xing header, ID3 tag, APE tag, 」· C头文件 代码 · 共 41 行

H
41
字号
#pragma once
#include "mpaexception.h"
#include "mpafilestream.h"
#include "mpaframe.h"
#include "tags.h"

class CMPAFile
{
public:
	CMPAFile(LPCTSTR szFile);
	CMPAFile(CMPAStream* pStream);
	~CMPAFile(void);

	DWORD GetBegin() const { return m_pTags->GetBegin(); };
	DWORD GetEnd() const { return m_pTags->GetEnd(); };
	DWORD GetFileSize() const { return (GetEnd() - GetBegin()); };
	DWORD GetLengthSec() const { return (GetFileSize() / m_dwBytesPerSec); };
	
	enum GetType
	{
		First,
		Last,
		Next,
		Prev,
		Resync
	};

	CMPAFrame* GetFrame(GetType Type, CMPAFrame* pFrame = NULL, bool bDeleteOldFrame = true, DWORD dwOffset = 0);
	
private:
	void CalcBytesPerSec();

	CMPAStream* m_pStream;
	DWORD m_dwBytesPerSec;
	
public:	
	CTags* m_pTags;					// contain list of present tags
	CMPAFrame* m_pFirstFrame;	// always first frame
	CVBRHeader* m_pVBRHeader;		// XING or VBRI or NULL
};

⌨️ 快捷键说明

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