comparison data/fileio/AudioFileReader.h @ 929:59e7fe1b1003 warnfix_no_size_t

Unsigned removals and warning fixes in data/
author Chris Cannam
date Tue, 17 Jun 2014 14:33:42 +0100
parents f0558e69a074
children c9d456b1fcde
comparison
equal deleted inserted replaced
928:6a94bb528e9d 929:59e7fe1b1003
34 34
35 bool isOK() const { return (m_channelCount > 0); } 35 bool isOK() const { return (m_channelCount > 0); }
36 36
37 virtual QString getError() const { return ""; } 37 virtual QString getError() const { return ""; }
38 38
39 size_t getFrameCount() const { return m_frameCount; } 39 int getFrameCount() const { return m_frameCount; }
40 size_t getChannelCount() const { return m_channelCount; } 40 int getChannelCount() const { return m_channelCount; }
41 size_t getSampleRate() const { return m_sampleRate; } 41 int getSampleRate() const { return m_sampleRate; }
42 42
43 virtual size_t getNativeRate() const { return m_sampleRate; } // if resampled 43 virtual int getNativeRate() const { return m_sampleRate; } // if resampled
44 44
45 /** 45 /**
46 * Return the location of the audio data in the reader (as passed 46 * Return the location of the audio data in the reader (as passed
47 * in to the FileSource constructor, for example). 47 * in to the FileSource constructor, for example).
48 */ 48 */
79 * 79 *
80 * The subclass implementations of this function must be 80 * The subclass implementations of this function must be
81 * thread-safe -- that is, safe to call from multiple threads with 81 * thread-safe -- that is, safe to call from multiple threads with
82 * different arguments on the same object at the same time. 82 * different arguments on the same object at the same time.
83 */ 83 */
84 virtual void getInterleavedFrames(size_t start, size_t count, 84 virtual void getInterleavedFrames(int start, int count,
85 SampleBlock &frames) const = 0; 85 SampleBlock &frames) const = 0;
86 86
87 /** 87 /**
88 * Return de-interleaved samples for count frames from index 88 * Return de-interleaved samples for count frames from index
89 * start. Implemented in this class (it calls 89 * start. Implemented in this class (it calls
90 * getInterleavedFrames and de-interleaves). The resulting vector 90 * getInterleavedFrames and de-interleaves). The resulting vector
91 * will contain getChannelCount() sample blocks of count samples 91 * will contain getChannelCount() sample blocks of count samples
92 * each (or fewer if end of file is reached). 92 * each (or fewer if end of file is reached).
93 */ 93 */
94 virtual void getDeInterleavedFrames(size_t start, size_t count, 94 virtual void getDeInterleavedFrames(int start, int count,
95 std::vector<SampleBlock> &frames) const; 95 std::vector<SampleBlock> &frames) const;
96 96
97 // only subclasses that do not know exactly how long the audio 97 // only subclasses that do not know exactly how long the audio
98 // file is until it's been completely decoded should implement this 98 // file is until it's been completely decoded should implement this
99 virtual int getDecodeCompletion() const { return 100; } // % 99 virtual int getDecodeCompletion() const { return 100; } // %
102 102
103 signals: 103 signals:
104 void frameCountChanged(); 104 void frameCountChanged();
105 105
106 protected: 106 protected:
107 size_t m_frameCount; 107 int m_frameCount;
108 size_t m_channelCount; 108 int m_channelCount;
109 size_t m_sampleRate; 109 int m_sampleRate;
110 }; 110 };
111 111
112 #endif 112 #endif