| #pragma once |
| |
| #ifndef TSOUND_IO_INCLUDED |
| #define TSOUND_IO_INCLUDED |
| |
| #include <QStringList> |
| #include "tfilepath.h" |
| #include "tsound.h" |
| |
| #undef DVAPI |
| #undef DVVAR |
| #ifdef TSOUND_EXPORTS |
| #define DVAPI DV_EXPORT_API |
| #define DVVAR DV_EXPORT_VAR |
| #else |
| #define DVAPI DV_IMPORT_API |
| #define DVVAR DV_IMPORT_VAR |
| #endif |
| |
| |
| |
| class TSoundTrackReader; |
| typedef TSoundTrackReader *TSoundTrackReaderCreateProc(const TFilePath &path); |
| |
| |
| |
| |
| |
| |
| |
| class DVAPI TSoundTrackReader : public TSmartObject { |
| DECLARE_CLASS_CODE |
| |
| protected: |
| TFilePath m_path; |
| |
| public: |
| TSoundTrackReader(const TFilePath &fp); |
| ~TSoundTrackReader(); |
| |
| virtual TSoundTrackP load() = 0; |
| |
| |
| |
| |
| |
| static bool load(const TFilePath &, TSoundTrackP &); |
| |
| static void getSupportedFormats(QStringList &names); |
| static void define(QString extension, TSoundTrackReaderCreateProc *proc); |
| }; |
| |
| #ifdef _WIN32 |
| template class DVAPI TSmartPointerT<TSoundTrackReader>; |
| #endif |
| |
| class DVAPI TSoundTrackReaderP final |
| : public TSmartPointerT<TSoundTrackReader> { |
| public: |
| TSoundTrackReaderP(const TFilePath &fp); |
| }; |
| |
| |
| |
| class TSoundTrackWriter; |
| typedef TSoundTrackWriter *TSoundTrackWriterCreateProc(const TFilePath &path); |
| |
| |
| |
| |
| |
| |
| |
| class DVAPI TSoundTrackWriter : public TSmartObject { |
| DECLARE_CLASS_CODE |
| |
| protected: |
| TFilePath m_path; |
| |
| public: |
| TSoundTrackWriter(const TFilePath &fp); |
| ~TSoundTrackWriter(); |
| |
| virtual bool save(const TSoundTrackP &) = 0; |
| |
| static bool save(const TFilePath &, const TSoundTrackP &); |
| |
| static void getSupportedFormats(QStringList &names); |
| |
| static void define(QString extension, TSoundTrackWriterCreateProc *proc); |
| }; |
| |
| #ifdef _WIN32 |
| template class DVAPI TSmartPointerT<TSoundTrackWriter>; |
| #endif |
| |
| class DVAPI TSoundTrackWriterP final |
| : public TSmartPointerT<TSoundTrackWriter> { |
| public: |
| TSoundTrackWriterP(const TFilePath &fp); |
| }; |
| |
| #endif |