⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 mpafile.h

📁 获取mp3信息, Xing header, ID3 tag, APE tag, VBR header
💻 H
字号:
#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 + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -