comparison data/fileio/WavFileReader.h @ 285:20028c634494

* change some QStrings to std::strings etc
author Chris Cannam
date Thu, 09 Aug 2007 16:29:29 +0000
parents e08f486e8d8c
children 92e8dbde73cd
comparison
equal deleted inserted replaced
284:41d64b873d87 285:20028c634494
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(QString path, bool fileUpdating = false); 29 WavFileReader(std::string path, bool fileUpdating = false);
30 virtual ~WavFileReader(); 30 virtual ~WavFileReader();
31
32 virtual QString getError() const { return m_error; }
33 31
34 /** 32 /**
35 * Must be safe to call from multiple threads with different 33 * Must be safe to call from multiple threads with different
36 * arguments on the same object at the same time. 34 * arguments on the same object at the same time.
37 */ 35 */
38 virtual void getInterleavedFrames(size_t start, size_t count, 36 virtual void getInterleavedFrames(size_t start, size_t count,
39 SampleBlock &frames) const; 37 SampleBlock &frames) const;
40 38
41 static void getSupportedExtensions(std::set<QString> &extensions); 39 static void getSupportedExtensions(std::set<std::string> &extensions);
42 40
43 virtual int getDecodeCompletion() const { return 100; } 41 virtual int getDecodeCompletion() const { return 100; }
44 42
45 bool isUpdating() const { return m_updating; } 43 bool isUpdating() const { return m_updating; }
46 44
49 47
50 protected: 48 protected:
51 SF_INFO m_fileInfo; 49 SF_INFO m_fileInfo;
52 SNDFILE *m_file; 50 SNDFILE *m_file;
53 51
54 QString m_path; 52 std::string m_path;
55 QString m_error;
56 53
57 mutable QMutex m_mutex; 54 mutable QMutex m_mutex;
58 mutable float *m_buffer; 55 mutable float *m_buffer;
59 mutable size_t m_bufsiz; 56 mutable size_t m_bufsiz;
60 mutable size_t m_lastStart; 57 mutable size_t m_lastStart;