MCPcopy Create free account
hub / github.com/BatchDrake/SigDigger / feedSet

Method feedSet

Components/SamplerDialog.cpp:204–230  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

202}
203
204void
205SamplerDialog::feedSet(WaveSampleSet const &set)
206{
207 if (this->decider.getDecisionMode() == Decider::MODULUS) {
208 for (SUSCOUNT i = 0; i < set.len; ++i) {
209 SUFLOAT amp = SU_C_ABS(set.block[i]);
210 if (amp > this->maxVal)
211 this->maxVal = SU_C_ABS(set.block[i]);
212 if (amp < this->minVal)
213 this->minVal = SU_C_ABS(set.block[i]);
214 }
215 } else {
216 for (SUSCOUNT i = 0; i < set.len; ++i) {
217 SUFLOAT arg = SU_C_ARG(set.block[i]);
218 if (arg > this->maxVal)
219 this->maxVal = SU_C_ARG(set.block[i]);
220 if (arg < this->minVal)
221 this->minVal = SU_C_ARG(set.block[i]);
222 }
223 }
224
225 this->ui->histogram->feed(set.block, set.len);
226 this->ui->symView->feed(set.symbols, set.len);
227
228 this->refreshHScrollBar();
229 this->refreshVScrollBar();
230}
231
232WaveSampler *
233SamplerDialog::makeSampler(void)

Callers 1

onSampleSetMethod · 0.80

Calls 3

refreshHScrollBarMethod · 0.95
refreshVScrollBarMethod · 0.95
feedMethod · 0.45

Tested by

no test coverage detected