comparison audioio/AudioGenerator.h @ 366:0876ea394902 warnfix_no_size_t

Remove size_t's, fix compiler warnings
author Chris Cannam
date Tue, 17 Jun 2014 16:23:06 +0100
parents 8d7f39df44ed
children 2484e6f95c06
comparison
equal deleted inserted replaced
355:e7a3fa8f4eec 366:0876ea394902
65 65
66 /** 66 /**
67 * Set the target channel count. The buffer parameter to mixModel 67 * Set the target channel count. The buffer parameter to mixModel
68 * must always point to at least this number of arrays. 68 * must always point to at least this number of arrays.
69 */ 69 */
70 virtual void setTargetChannelCount(size_t channelCount); 70 virtual void setTargetChannelCount(int channelCount);
71 71
72 /** 72 /**
73 * Return the internal processing block size. The frameCount 73 * Return the internal processing block size. The frameCount
74 * argument to all mixModel calls must be a multiple of this 74 * argument to all mixModel calls must be a multiple of this
75 * value. 75 * value.
76 */ 76 */
77 virtual size_t getBlockSize() const; 77 virtual int getBlockSize() const;
78 78
79 /** 79 /**
80 * Mix a single model into an output buffer. 80 * Mix a single model into an output buffer.
81 */ 81 */
82 virtual size_t mixModel(Model *model, size_t startFrame, size_t frameCount, 82 virtual int mixModel(Model *model, int startFrame, int frameCount,
83 float **buffer, size_t fadeIn = 0, size_t fadeOut = 0); 83 float **buffer, int fadeIn = 0, int fadeOut = 0);
84 84
85 /** 85 /**
86 * Specify that only the given set of models should be played. 86 * Specify that only the given set of models should be played.
87 */ 87 */
88 virtual void setSoloModelSet(std::set<Model *>s); 88 virtual void setSoloModelSet(std::set<Model *>s);
95 95
96 protected slots: 96 protected slots:
97 void playClipIdChanged(const Playable *, QString); 97 void playClipIdChanged(const Playable *, QString);
98 98
99 protected: 99 protected:
100 size_t m_sourceSampleRate; 100 int m_sourceSampleRate;
101 size_t m_targetChannelCount; 101 int m_targetChannelCount;
102 size_t m_waveType; 102 int m_waveType;
103 103
104 bool m_soloing; 104 bool m_soloing;
105 std::set<Model *> m_soloModelSet; 105 std::set<Model *> m_soloModelSet;
106 106
107 struct NoteOff { 107 struct NoteOff {
108 108
109 NoteOff(float _freq, size_t _frame) : frequency(_freq), frame(_frame) { } 109 NoteOff(float _freq, int _frame) : frequency(_freq), frame(_frame) { }
110 110
111 float frequency; 111 float frequency;
112 size_t frame; 112 int frame;
113 113
114 struct Comparator { 114 struct Comparator {
115 bool operator()(const NoteOff &n1, const NoteOff &n2) const { 115 bool operator()(const NoteOff &n1, const NoteOff &n2) const {
116 return n1.frame < n2.frame; 116 return n1.frame < n2.frame;
117 } 117 }
141 ClipMixer *makeClipMixerFor(const Model *model); 141 ClipMixer *makeClipMixerFor(const Model *model);
142 ContinuousSynth *makeSynthFor(const Model *model); 142 ContinuousSynth *makeSynthFor(const Model *model);
143 143
144 static void initialiseSampleDir(); 144 static void initialiseSampleDir();
145 145
146 virtual size_t mixDenseTimeValueModel 146 virtual int mixDenseTimeValueModel
147 (DenseTimeValueModel *model, size_t startFrame, size_t frameCount, 147 (DenseTimeValueModel *model, int startFrame, int frameCount,
148 float **buffer, float gain, float pan, size_t fadeIn, size_t fadeOut); 148 float **buffer, float gain, float pan, int fadeIn, int fadeOut);
149 149
150 virtual size_t mixClipModel 150 virtual int mixClipModel
151 (Model *model, size_t startFrame, size_t frameCount, 151 (Model *model, int startFrame, int frameCount,
152 float **buffer, float gain, float pan); 152 float **buffer, float gain, float pan);
153 153
154 virtual size_t mixContinuousSynthModel 154 virtual int mixContinuousSynthModel
155 (Model *model, size_t startFrame, size_t frameCount, 155 (Model *model, int startFrame, int frameCount,
156 float **buffer, float gain, float pan); 156 float **buffer, float gain, float pan);
157 157
158 static const size_t m_processingBlockSize; 158 static const int m_processingBlockSize;
159 }; 159 };
160 160
161 #endif 161 #endif
162 162