Jeremy Bullock 3f5067
#pragma once
Jeremy Bullock 3f5067
Jeremy Bullock 3f5067
#ifndef TSIO_MP3_INCLUDED
Jeremy Bullock 3f5067
#define TSIO_MP3_INCLUDED
Jeremy Bullock 3f5067
Jeremy Bullock 3f5067
#include "tsound_io.h"
Jeremy Bullock 3f5067
Jeremy Bullock 3f5067
//==========================================================
Jeremy Bullock 3f5067
/*!
Jeremy Bullock 3f5067
The class TSoundTrackReaderMp3 reads audio files having
Jeremy Bullock 3f5067
.mp3 extension
Jeremy Bullock 3f5067
*/
Jeremy Bullock 3f5067
class TSoundTrackReaderMp3 final : public TSoundTrackReader {
Jeremy Bullock 3f5067
public:
Jeremy Bullock 3f5067
  TSoundTrackReaderMp3(const TFilePath &fp);
Jeremy Bullock 3f5067
  ~TSoundTrackReaderMp3() {}
Jeremy Bullock 3f5067
Jeremy Bullock 3f5067
  /*!
Jeremy Bullock 3f5067
Loads the .mp3 audio file whose path has been specified in the constructor.
Jeremy Bullock 3f5067
It returns a TSoundTrackP created from the audio file
Jeremy Bullock 3f5067
*/
Jeremy Bullock 3f5067
  TSoundTrackP load() override;
Jeremy Bullock 3f5067
Jeremy Bullock 3f5067
  /*!
Jeremy Bullock 3f5067
Returns a soundtrack reader able to read .mp3 audio files
Jeremy Bullock 3f5067
*/
Jeremy Bullock 3f5067
  static TSoundTrackReader *create(const TFilePath &fp) {
Jeremy Bullock 3f5067
    return new TSoundTrackReaderMp3(fp);
Jeremy Bullock 3f5067
  }
Jeremy Bullock 3f5067
};
Jeremy Bullock 3f5067
Jeremy Bullock 3f5067
class FfmpegAudio {
Jeremy Bullock 3f5067
public:
Jeremy Bullock 3f5067
  TFilePath getRawAudio(TFilePath path);
Jeremy Bullock 3f5067
Jeremy Bullock 3f5067
private:
Jeremy Bullock 3f5067
  TFilePath getFfmpegCache();
Jeremy Bullock 3f5067
  void runFfmpeg(QStringList args);
Jeremy Bullock 3f5067
};
Jeremy Bullock 3f5067
Jeremy Bullock 3f5067
#endif