Mercurial > hg > svcore
comparison data/fileio/DecodingWavFileReader.h @ 1126:39019ce29178 tony-2.0-integration
Merge through to branch for Tony 2.0
author | Chris Cannam |
---|---|
date | Thu, 20 Aug 2015 14:54:21 +0100 |
parents | abc309f507ae |
children | 54af1e21705c |
comparison
equal
deleted
inserted
replaced
1119:e22bfe8ca248 | 1126:39019ce29178 |
---|---|
27 | 27 |
28 class DecodingWavFileReader : public CodedAudioFileReader | 28 class DecodingWavFileReader : public CodedAudioFileReader |
29 { | 29 { |
30 Q_OBJECT | 30 Q_OBJECT |
31 public: | 31 public: |
32 enum ResampleMode { | |
33 ResampleAtOnce, // resample the file on construction, with progress dialog | |
34 ResampleThreaded // resample in a background thread after construction | |
35 }; | |
36 | |
37 DecodingWavFileReader(FileSource source, | 32 DecodingWavFileReader(FileSource source, |
38 ResampleMode resampleMode, | 33 DecodeMode decodeMode, // determines when to resample |
39 CacheMode cacheMode, | 34 CacheMode cacheMode, |
40 sv_samplerate_t targetRate = 0, | 35 sv_samplerate_t targetRate = 0, |
41 bool normalised = false, | 36 bool normalised = false, |
42 ProgressReporter *reporter = 0); | 37 ProgressReporter *reporter = 0); |
43 virtual ~DecodingWavFileReader(); | 38 virtual ~DecodingWavFileReader(); |
67 int m_completion; | 62 int m_completion; |
68 | 63 |
69 WavFileReader *m_original; | 64 WavFileReader *m_original; |
70 ProgressReporter *m_reporter; | 65 ProgressReporter *m_reporter; |
71 | 66 |
72 void addBlock(const SampleBlock &frames); | 67 void addBlock(const std::vector<float> &frames); |
73 | 68 |
74 class DecodeThread : public Thread | 69 class DecodeThread : public Thread |
75 { | 70 { |
76 public: | 71 public: |
77 DecodeThread(DecodingWavFileReader *reader) : m_reader(reader) { } | 72 DecodeThread(DecodingWavFileReader *reader) : m_reader(reader) { } |