Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
#ifndef TSIO_RAW_INCLUDED
Toshihiro Shimizu 890ddd
#define TSIO_RAW_INCLUDED
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
#include "tsound_io.h"
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
//==========================================================
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
/*!
Toshihiro Shimizu 890ddd
The class TSoundTrackReaderRaw reads audio files having
Toshihiro Shimizu 890ddd
.raw extension (this kind of file contains only the sample)
Toshihiro Shimizu 890ddd
*/
Toshihiro Shimizu 890ddd
class TSoundTrackReaderRaw : public TSoundTrackReader
Toshihiro Shimizu 890ddd
{
Toshihiro Shimizu 890ddd
public:
Toshihiro Shimizu 890ddd
	TSoundTrackReaderRaw(const TFilePath &fp);
Toshihiro Shimizu 890ddd
	~TSoundTrackReaderRaw() {}
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
	/*!
Toshihiro Shimizu 890ddd
  Loads the .raw audio file whose path has been specified in the constructor.
Toshihiro Shimizu 890ddd
  It returns a TSoundTrackP created from the audio file 
Toshihiro Shimizu 890ddd
  */
Toshihiro Shimizu 890ddd
	TSoundTrackP load();
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
	/*!
Toshihiro Shimizu 890ddd
  Returns a soundtrack reader able to read .raw audio files
Toshihiro Shimizu 890ddd
  */
Toshihiro Shimizu 890ddd
	static TSoundTrackReader *create(const TFilePath &fp)
Toshihiro Shimizu 890ddd
	{
Toshihiro Shimizu 890ddd
		return new TSoundTrackReaderRaw(fp);
Toshihiro Shimizu 890ddd
	}
Toshihiro Shimizu 890ddd
};
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
//==========================================================
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
/*!
Toshihiro Shimizu 890ddd
The class TSoundTrackWriterRaw writes audio file having
Toshihiro Shimizu 890ddd
.raw extension (this kind of file contains only the sample)
Toshihiro Shimizu 890ddd
*/
Toshihiro Shimizu 890ddd
class TSoundTrackWriterRaw : public TSoundTrackWriter
Toshihiro Shimizu 890ddd
{
Toshihiro Shimizu 890ddd
public:
Toshihiro Shimizu 890ddd
	TSoundTrackWriterRaw(const TFilePath &fp);
Toshihiro Shimizu 890ddd
	~TSoundTrackWriterRaw() {}
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
	/*!
Toshihiro Shimizu 890ddd
  Saves the informations of the soundtrack in .raw audio file
Toshihiro Shimizu 890ddd
  whose path has been specified in the constructor.
Toshihiro Shimizu 890ddd
  */
Toshihiro Shimizu 890ddd
	bool save(const TSoundTrackP &);
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
	/*!
Toshihiro Shimizu 890ddd
  Returns a soundtrack writer able to write .raw audio files
Toshihiro Shimizu 890ddd
  */
Toshihiro Shimizu 890ddd
	static TSoundTrackWriter *create(const TFilePath &fp)
Toshihiro Shimizu 890ddd
	{
Toshihiro Shimizu 890ddd
		return new TSoundTrackWriterRaw(fp);
Toshihiro Shimizu 890ddd
	}
Toshihiro Shimizu 890ddd
};
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
#endif