Mercurial > hg > svcore
diff data/fileio/AudioFileReader.h @ 285:20028c634494
* change some QStrings to std::strings etc
author | Chris Cannam |
---|---|
date | Thu, 09 Aug 2007 16:29:29 +0000 |
parents | 822bd7fd526c |
children | 92e8dbde73cd |
line wrap: on
line diff
--- a/data/fileio/AudioFileReader.h Thu Aug 09 14:40:03 2007 +0000 +++ b/data/fileio/AudioFileReader.h Thu Aug 09 16:29:29 2007 +0000 @@ -16,8 +16,10 @@ #ifndef _AUDIO_FILE_READER_H_ #define _AUDIO_FILE_READER_H_ -#include <QString> -#include "model/Model.h" // for SampleBlock +#include <QObject> + +#include <string> +#include <vector> class AudioFileReader : public QObject { @@ -26,9 +28,11 @@ public: virtual ~AudioFileReader() { } + typedef std::vector<float> SampleBlock; + bool isOK() const { return (m_channelCount > 0); } - virtual QString getError() const { return ""; } + virtual std::string getError() const { return m_error; } size_t getFrameCount() const { return m_frameCount; } size_t getChannelCount() const { return m_channelCount; } @@ -39,7 +43,7 @@ * may be implemented by subclasses that support file tagging. * This is not the same thing as the file name. */ - virtual QString getTitle() const { return ""; } + virtual std::string getTitle() const { return ""; } /** * The subclass implementations of this function must be @@ -62,6 +66,10 @@ size_t m_frameCount; size_t m_channelCount; size_t m_sampleRate; + + std::string m_error; + void setError(std::string text, std::string arg = ""); + void setError(std::string text, int arg); }; #endif