Shinya Kitaoka 810553
#pragma once
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
#ifndef TSIO_WAV_INCLUDED
Toshihiro Shimizu 890ddd
#define TSIO_WAV_INCLUDED
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
#include "tsound_io.h"
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
//==========================================================
Toshihiro Shimizu 890ddd
/*!
Toshihiro Shimizu 890ddd
The class TSoundTrackReaderWav reads audio files having
Shinya Kitaoka 120a6e
.wav extension
Toshihiro Shimizu 890ddd
*/
Shinya Kitaoka d1f6c4
class TSoundTrackReaderWav final : public TSoundTrackReader {
Toshihiro Shimizu 890ddd
public:
Shinya Kitaoka 120a6e
  TSoundTrackReaderWav(const TFilePath &fp);
Shinya Kitaoka 120a6e
  ~TSoundTrackReaderWav() {}
Shinya Kitaoka 120a6e
Shinya Kitaoka 120a6e
  /*!
Shinya Kitaoka 120a6e
Loads the .wav audio file whose path has been specified in the constructor.
Shinya Kitaoka 120a6e
It returns a TSoundTrackP created from the audio file
Shinya Kitaoka 120a6e
*/
Shinya Kitaoka 473e70
  TSoundTrackP load() override;
Shinya Kitaoka 120a6e
Shinya Kitaoka 120a6e
  /*!
Shinya Kitaoka 120a6e
Returns a soundtrack reader able to read .wav audio files
Shinya Kitaoka 120a6e
*/
Shinya Kitaoka 120a6e
  static TSoundTrackReader *create(const TFilePath &fp) {
Shinya Kitaoka 120a6e
    return new TSoundTrackReaderWav(fp);
Shinya Kitaoka 120a6e
  }
Toshihiro Shimizu 890ddd
};
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
//==========================================================
Toshihiro Shimizu 890ddd
/*!
Toshihiro Shimizu 890ddd
The class TSoundTrackWriterWav writes audio file having
Toshihiro Shimizu 890ddd
.wav extension
Toshihiro Shimizu 890ddd
*/
Toshihiro Shimizu 890ddd
Shinya Kitaoka d1f6c4
class TSoundTrackWriterWav final : public TSoundTrackWriter {
Toshihiro Shimizu 890ddd
public:
Shinya Kitaoka 120a6e
  TSoundTrackWriterWav(const TFilePath &fp);
Shinya Kitaoka 120a6e
  ~TSoundTrackWriterWav() {}
Shinya Kitaoka 120a6e
Shinya Kitaoka 120a6e
  /*!
Shinya Kitaoka 120a6e
Saves the informations of the soundtrack in .wav audio file
Shinya Kitaoka 120a6e
whose path has been specified in the constructor.
Shinya Kitaoka 120a6e
*/
Shinya Kitaoka 473e70
  bool save(const TSoundTrackP &) override;
Shinya Kitaoka 120a6e
Shinya Kitaoka 120a6e
  /*!
Shinya Kitaoka 120a6e
Returns a soundtrack writer able to write .wav audio files
Shinya Kitaoka 120a6e
*/
Shinya Kitaoka 120a6e
  static TSoundTrackWriter *create(const TFilePath &fp) {
Shinya Kitaoka 120a6e
    return new TSoundTrackWriterWav(fp);
Shinya Kitaoka 120a6e
  }
Toshihiro Shimizu 890ddd
};
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
#endif