auto and braces
This commit is contained in:
parent
0814d67337
commit
f405e2c23f
3 changed files with 7 additions and 7 deletions
|
|
@ -105,7 +105,7 @@ void sfz::Oversampler::stream(const sfz::AudioBuffer<float>& input, sfz::AudioBu
|
|||
{
|
||||
// std::cout << "Input frames: " << inputFrameCounter << "/" << numFrames << '\n';
|
||||
const auto thisChunkSize = std::min(chunkSize, numFrames - inputFrameCounter);
|
||||
const auto outputChunkSize { thisChunkSize * static_cast<int>(factor) };
|
||||
const auto outputChunkSize = thisChunkSize * static_cast<int>(factor);
|
||||
for (size_t chanIdx = 0; chanIdx < numChannels; chanIdx++) {
|
||||
const auto inputChunk = input.getSpan(chanIdx).subspan(inputFrameCounter, thisChunkSize);
|
||||
const auto outputChunk = output.getSpan(chanIdx).subspan(outputFrameCounter, outputChunkSize);
|
||||
|
|
|
|||
|
|
@ -342,7 +342,7 @@ bool sfz::Synth::loadSfzFile(const fs::path& file)
|
|||
region->isStereo = true;
|
||||
|
||||
// TODO: adjust with LFO targets
|
||||
const auto maxOffset { region->offset + region->offsetRandom };
|
||||
const auto maxOffset = region->offset + region->offsetRandom;
|
||||
if (!resources.filePool.preloadFile(region->sample, maxOffset))
|
||||
removeCurrentRegion();
|
||||
}
|
||||
|
|
@ -432,7 +432,7 @@ sfz::Voice* sfz::Synth::findFreeVoice() noexcept
|
|||
|
||||
int sfz::Synth::getNumActiveVoices() const noexcept
|
||||
{
|
||||
auto activeVoices { 0 };
|
||||
auto activeVoices = 0;
|
||||
for (const auto& voice : voices) {
|
||||
if (!voice->isFree())
|
||||
activeVoices++;
|
||||
|
|
|
|||
|
|
@ -45,7 +45,7 @@ void sfz::Voice::startVoice(Region* region, int delay, int number, uint8_t value
|
|||
pitchRatio = region->getBasePitchVariation(number, value);
|
||||
|
||||
baseVolumedB = region->getBaseVolumedB(number);
|
||||
auto volumedB { baseVolumedB };
|
||||
auto volumedB = baseVolumedB;
|
||||
if (region->volumeCC)
|
||||
volumedB += normalizeCC(resources.midiState.getCCValue(region->volumeCC->cc)) * region->volumeCC->value;
|
||||
volumeEnvelope.reset(db2mag(Default::volumeRange.clamp(volumedB)));
|
||||
|
|
@ -63,19 +63,19 @@ void sfz::Voice::startVoice(Region* region, int delay, int number, uint8_t value
|
|||
crossfadeEnvelope.reset(Default::normalizedRange.clamp(crossfadeGain));
|
||||
|
||||
basePan = normalizePercents(region->pan);
|
||||
auto pan { basePan };
|
||||
auto pan = basePan;
|
||||
if (region->panCC)
|
||||
pan += normalizeCC(resources.midiState.getCCValue(region->panCC->cc)) * normalizePercents(region->panCC->value);
|
||||
panEnvelope.reset(Default::symmetricNormalizedRange.clamp(pan));
|
||||
|
||||
basePosition = normalizePercents(region->position);
|
||||
auto position { basePosition };
|
||||
auto position = basePosition;
|
||||
if (region->positionCC)
|
||||
position += normalizeCC(resources.midiState.getCCValue(region->positionCC->cc)) * normalizePercents(region->positionCC->value);
|
||||
positionEnvelope.reset(Default::symmetricNormalizedRange.clamp(position));
|
||||
|
||||
baseWidth = normalizePercents(region->width);
|
||||
auto width { baseWidth };
|
||||
auto width = baseWidth;
|
||||
if (region->widthCC)
|
||||
width += normalizeCC(resources.midiState.getCCValue(region->widthCC->cc)) * normalizePercents(region->widthCC->value);
|
||||
widthEnvelope.reset(Default::symmetricNormalizedRange.clamp(width));
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue