OFL.h 417 B

1234567891011121314151617181920
  1. #pragma once
  2. #include "MPEGHeader.h"
  3. class OFL
  4. {
  5. public:
  6. int Read(const MPEGHeader &header, const uint8_t *buffer, size_t buffer_len);
  7. double GetLengthSeconds() const;
  8. uint64_t GetSamples() const;
  9. uint32_t GetFrames() const;
  10. int GetGaps(size_t *pregap, size_t *postgap);
  11. private:
  12. int samples_per_frame;
  13. uint32_t total_length;
  14. uint16_t codec_delay;
  15. uint16_t additional_delay;
  16. unsigned int sample_rate;
  17. };