Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
#ifndef TSOUND_IO_INCLUDED
Toshihiro Shimizu 890ddd
#define TSOUND_IO_INCLUDED
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
#include <qstringlist></qstringlist>
Toshihiro Shimizu 890ddd
#include "tfilepath.h"
Toshihiro Shimizu 890ddd
#include "tsound.h"
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
#undef DVAPI
Toshihiro Shimizu 890ddd
#undef DVVAR
Toshihiro Shimizu 890ddd
#ifdef TSOUND_EXPORTS
Toshihiro Shimizu 890ddd
#define DVAPI DV_EXPORT_API
Toshihiro Shimizu 890ddd
#define DVVAR DV_EXPORT_VAR
Toshihiro Shimizu 890ddd
#else
Toshihiro Shimizu 890ddd
#define DVAPI DV_IMPORT_API
Toshihiro Shimizu 890ddd
#define DVVAR DV_IMPORT_VAR
Toshihiro Shimizu 890ddd
#endif
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
//=========================================================
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
class TSoundTrackReader;
Toshihiro Shimizu 890ddd
typedef TSoundTrackReader *TSoundTrackReaderCreateProc(const TFilePath &path);
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
//--------------------------------------------------------
Toshihiro Shimizu 890ddd
//!\include sndReader_ex.cpp
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
/*!
Toshihiro Shimizu 890ddd
  Superclass for specialized reader of a specific type of audio file
Toshihiro Shimizu 890ddd
*/
Toshihiro Shimizu 890ddd
class DVAPI TSoundTrackReader : public TSmartObject
Toshihiro Shimizu 890ddd
{
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
	DECLARE_CLASS_CODE
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
protected:
Toshihiro Shimizu 890ddd
	TFilePath m_path;
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
public:
Toshihiro Shimizu 890ddd
	TSoundTrackReader(const TFilePath &fp);
Toshihiro Shimizu 890ddd
	~TSoundTrackReader();
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
	virtual TSoundTrackP load() = 0;
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
	// forse sarebbe il caso di aggiungere un metodo loadInfo()
Toshihiro Shimizu 890ddd
	// che restituisce una soundtrack con buffer vuoto
Toshihiro Shimizu 890ddd
	// per accedere alle informazioni sulla soundtrack
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
	static bool load(const TFilePath &, TSoundTrackP &);
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
	static void getSupportedFormats(QStringList &names);
Toshihiro Shimizu 890ddd
	static void define(
Toshihiro Shimizu 890ddd
		QString extension,
Toshihiro Shimizu 890ddd
		TSoundTrackReaderCreateProc *proc);
Toshihiro Shimizu 890ddd
};
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
#ifdef WIN32
Toshihiro Shimizu 890ddd
template class DVAPI TSmartPointerT<tsoundtrackreader>;</tsoundtrackreader>
Toshihiro Shimizu 890ddd
#endif
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
class DVAPI TSoundTrackReaderP : public TSmartPointerT<tsoundtrackreader></tsoundtrackreader>
Toshihiro Shimizu 890ddd
{
Toshihiro Shimizu 890ddd
public:
Toshihiro Shimizu 890ddd
	TSoundTrackReaderP(const TFilePath &fp);
Toshihiro Shimizu 890ddd
};
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
//=========================================================
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
class TSoundTrackWriter;
Toshihiro Shimizu 890ddd
typedef TSoundTrackWriter *TSoundTrackWriterCreateProc(const TFilePath &path);
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
//--------------------------------------------------------
Toshihiro Shimizu 890ddd
//!\include sndWriter_ex.cpp
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
/*!
Toshihiro Shimizu 890ddd
  Superclass for specialized writer of a specific type of audio file
Toshihiro Shimizu 890ddd
*/
Toshihiro Shimizu 890ddd
class DVAPI TSoundTrackWriter : public TSmartObject
Toshihiro Shimizu 890ddd
{
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
	DECLARE_CLASS_CODE
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
protected:
Toshihiro Shimizu 890ddd
	TFilePath m_path;
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
public:
Toshihiro Shimizu 890ddd
	TSoundTrackWriter(const TFilePath &fp);
Toshihiro Shimizu 890ddd
	~TSoundTrackWriter();
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
	virtual bool save(const TSoundTrackP &) = 0;
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
	static bool save(const TFilePath &, const TSoundTrackP &);
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
	static void getSupportedFormats(QStringList &names);
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
	static void define(
Toshihiro Shimizu 890ddd
		QString extension,
Toshihiro Shimizu 890ddd
		TSoundTrackWriterCreateProc *proc);
Toshihiro Shimizu 890ddd
};
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
#ifdef WIN32
Toshihiro Shimizu 890ddd
template class DVAPI TSmartPointerT<tsoundtrackwriter>;</tsoundtrackwriter>
Toshihiro Shimizu 890ddd
#endif
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
class DVAPI TSoundTrackWriterP : public TSmartPointerT<tsoundtrackwriter></tsoundtrackwriter>
Toshihiro Shimizu 890ddd
{
Toshihiro Shimizu 890ddd
public:
Toshihiro Shimizu 890ddd
	TSoundTrackWriterP(const TFilePath &fp);
Toshihiro Shimizu 890ddd
};
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
#endif