1
0

MPEGFrame.h 715 B

12345678910111213141516171819202122232425262728293031
  1. /*
  2. * MPEGFrame.h
  3. * -----------
  4. * Purpose: Basic MPEG frame parsing functionality
  5. * Notes : (currently none)
  6. * Authors: OpenMPT Devs
  7. * The OpenMPT source code is released under the BSD license. Read LICENSE for more details.
  8. */
  9. #pragma once
  10. #include "openmpt/all/BuildSettings.hpp"
  11. #include "../common/FileReaderFwd.h"
  12. OPENMPT_NAMESPACE_BEGIN
  13. class MPEGFrame
  14. {
  15. public:
  16. uint16 frameSize; // Complete frame size in bytes
  17. uint16 numSamples; // Number of samples in this frame (multiplied by number of channels)
  18. bool isValid; // Is a valid frame at all
  19. bool isLAME; // Has Xing/LAME header
  20. MPEGFrame(FileReader &file);
  21. static bool IsMPEGHeader(const uint8 (&header)[3]);
  22. };
  23. OPENMPT_NAMESPACE_END