comparison data/fileio/WavFileReader.h @ 290:92e8dbde73cd

* Revert revision 713. We do like QStrings after all.
author Chris Cannam
date Fri, 24 Aug 2007 11:41:48 +0000
parents 20028c634494
children 3a6725f285d6
comparison
equal deleted inserted replaced
289:3020904de772 290:92e8dbde73cd
24 #include <set> 24 #include <set>
25 25
26 class WavFileReader : public AudioFileReader 26 class WavFileReader : public AudioFileReader
27 { 27 {
28 public: 28 public:
29 WavFileReader(std::string path, bool fileUpdating = false); 29 WavFileReader(QString path, bool fileUpdating = false);
30 virtual ~WavFileReader(); 30 virtual ~WavFileReader();
31
32 virtual QString getError() const { return m_error; }
31 33
32 /** 34 /**
33 * Must be safe to call from multiple threads with different 35 * Must be safe to call from multiple threads with different
34 * arguments on the same object at the same time. 36 * arguments on the same object at the same time.
35 */ 37 */
36 virtual void getInterleavedFrames(size_t start, size_t count, 38 virtual void getInterleavedFrames(size_t start, size_t count,
37 SampleBlock &frames) const; 39 SampleBlock &frames) const;
38 40
39 static void getSupportedExtensions(std::set<std::string> &extensions); 41 static void getSupportedExtensions(std::set<QString> &extensions);
40 42
41 virtual int getDecodeCompletion() const { return 100; } 43 virtual int getDecodeCompletion() const { return 100; }
42 44
43 bool isUpdating() const { return m_updating; } 45 bool isUpdating() const { return m_updating; }
44 46
47 49
48 protected: 50 protected:
49 SF_INFO m_fileInfo; 51 SF_INFO m_fileInfo;
50 SNDFILE *m_file; 52 SNDFILE *m_file;
51 53
52 std::string m_path; 54 QString m_path;
55 QString m_error;
53 56
54 mutable QMutex m_mutex; 57 mutable QMutex m_mutex;
55 mutable float *m_buffer; 58 mutable float *m_buffer;
56 mutable size_t m_bufsiz; 59 mutable size_t m_bufsiz;
57 mutable size_t m_lastStart; 60 mutable size_t m_lastStart;