Mercurial > hg > svcore
comparison data/fileio/ResamplingWavFileReader.h @ 317:c324d410b096
* RemoteFile -> FileSource
  now it's used all over the place for local files as well.
| author | Chris Cannam | 
|---|---|
| date | Thu, 18 Oct 2007 16:20:26 +0000 | 
| parents | 3a6725f285d6 | 
| children | 700cd3350391 | 
   comparison
  equal
  deleted
  inserted
  replaced
| 316:3a6725f285d6 | 317:c324d410b096 | 
|---|---|
| 31 enum ResampleMode { | 31 enum ResampleMode { | 
| 32 ResampleAtOnce, // resample the file on construction, with progress dialog | 32 ResampleAtOnce, // resample the file on construction, with progress dialog | 
| 33 ResampleThreaded // resample in a background thread after construction | 33 ResampleThreaded // resample in a background thread after construction | 
| 34 }; | 34 }; | 
| 35 | 35 | 
| 36 ResamplingWavFileReader(RemoteFile source, | 36 ResamplingWavFileReader(FileSource source, | 
| 37 ResampleMode resampleMode, | 37 ResampleMode resampleMode, | 
| 38 CacheMode cacheMode, | 38 CacheMode cacheMode, | 
| 39 size_t targetRate = 0); | 39 size_t targetRate = 0); | 
| 40 virtual ~ResamplingWavFileReader(); | 40 virtual ~ResamplingWavFileReader(); | 
| 41 | 41 | 
| 42 virtual QString getError() const { return m_error; } | 42 virtual QString getError() const { return m_error; } | 
| 43 static void getSupportedExtensions(std::set<QString> &extensions); | 43 static void getSupportedExtensions(std::set<QString> &extensions); | 
| 44 static bool supportsExtension(QString ext); | 44 static bool supportsExtension(QString ext); | 
| 45 static bool supportsContentType(QString type); | 45 static bool supportsContentType(QString type); | 
| 46 static bool supports(RemoteFile &source); | 46 static bool supports(FileSource &source); | 
| 47 | 47 | 
| 48 virtual int getDecodeCompletion() const { return m_completion; } | 48 virtual int getDecodeCompletion() const { return m_completion; } | 
| 49 | 49 | 
| 50 virtual bool isUpdating() const { | 50 virtual bool isUpdating() const { | 
| 51 return m_decodeThread && m_decodeThread->isRunning(); | 51 return m_decodeThread && m_decodeThread->isRunning(); | 
| 52 } | 52 } | 
| 53 | 53 | 
| 54 protected: | 54 protected: | 
| 55 RemoteFile m_source; | 55 FileSource m_source; | 
| 56 QString m_path; | 56 QString m_path; | 
| 57 QString m_error; | 57 QString m_error; | 
| 58 bool m_cancelled; | 58 bool m_cancelled; | 
| 59 size_t m_processed; | 59 size_t m_processed; | 
| 60 int m_completion; | 60 int m_completion; | 
