Click here to Skip to main content
15,896,606 members
Articles / Desktop Programming / MFC

MPEG Audio Frame Header

Rate me:
Please Sign up or sign in to vote.
4.89/5 (95 votes)
12 Apr 2007LGPL317 min read 902.3K   20.8K   245  
An article about the MPEG audio frame header.
#pragma once
#include "mpastream.h"

class CTag
{
public:
	DWORD GetOffset() const { return m_dwOffset; };
	DWORD GetEnd() const { return m_dwOffset + m_dwSize; };
	LPCTSTR GetName() const { return m_szName; };
	DWORD GetSize() const { return m_dwSize; };
	float GetVersion() const { return m_fVersion; };
	
	virtual ~CTag(void);
protected:
	CMPAStream* m_pStream;

	CTag(CMPAStream* pStream, LPCTSTR szName, bool bAppended, DWORD dwOffset = 0, DWORD dwSize = 0);

	DWORD m_dwOffset;	// beginning of tag
	DWORD m_dwSize;		// size of tag
	bool m_bAppended;	// true if at the end of file
	float m_fVersion;	// format x.yz
	LPTSTR m_szName;	// name of tag

	void SetVersion(BYTE bVersion1, BYTE bVersion2=0, BYTE bVersion3=0);
};

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The GNU Lesser General Public License (LGPLv3)


Written By
Web Developer
Germany Germany
Author of the shareware WinCD.

Comments and Discussions