Clang-tidy 9 errors
This commit is contained in:
parent
a1cacea8fb
commit
bc4d88b55a
5 changed files with 9 additions and 9 deletions
|
|
@ -273,7 +273,7 @@ sfz::FilePromisePtr sfz::FilePool::getFilePromise(const std::string& filename) n
|
||||||
auto promise = emptyPromises.back();
|
auto promise = emptyPromises.back();
|
||||||
promise->filename = preloaded->first;
|
promise->filename = preloaded->first;
|
||||||
promise->preloadedData = preloaded->second.preloadedData;
|
promise->preloadedData = preloaded->second.preloadedData;
|
||||||
promise->sampleRate = preloaded->second.information.sampleRate;
|
promise->sampleRate = static_cast<float>(preloaded->second.information.sampleRate);
|
||||||
promise->oversamplingFactor = oversamplingFactor;
|
promise->oversamplingFactor = oversamplingFactor;
|
||||||
promise->creationTime = std::chrono::high_resolution_clock::now();
|
promise->creationTime = std::chrono::high_resolution_clock::now();
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -137,7 +137,7 @@ void sfz::MidiState::reset() noexcept
|
||||||
|
|
||||||
void sfz::MidiState::resetAllControllers(int delay) noexcept
|
void sfz::MidiState::resetAllControllers(int delay) noexcept
|
||||||
{
|
{
|
||||||
for (unsigned ccIdx = 0; ccIdx < config::numCCs; ++ccIdx)
|
for (int ccIdx = 0; ccIdx < config::numCCs; ++ccIdx)
|
||||||
ccEvent(delay, ccIdx, 0.0f);
|
ccEvent(delay, ccIdx, 0.0f);
|
||||||
|
|
||||||
pitchBend = 0;
|
pitchBend = 0;
|
||||||
|
|
|
||||||
|
|
@ -176,7 +176,7 @@ private:
|
||||||
* Pitch bend status
|
* Pitch bend status
|
||||||
*/
|
*/
|
||||||
int pitchBend { 0 };
|
int pitchBend { 0 };
|
||||||
double sampleRate { config::defaultSampleRate };
|
float sampleRate { config::defaultSampleRate };
|
||||||
int samplesPerBlock { config::defaultSamplesPerBlock };
|
int samplesPerBlock { config::defaultSamplesPerBlock };
|
||||||
unsigned internalClock { 0 };
|
unsigned internalClock { 0 };
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -970,7 +970,7 @@ float sfz::Region::getBasePitchVariation(int noteNumber, float velocity) const n
|
||||||
auto pitchVariationInCents = pitchKeytrack * (noteNumber - (int)pitchKeycenter); // note difference with pitch center
|
auto pitchVariationInCents = pitchKeytrack * (noteNumber - (int)pitchKeycenter); // note difference with pitch center
|
||||||
pitchVariationInCents += tune; // sample tuning
|
pitchVariationInCents += tune; // sample tuning
|
||||||
pitchVariationInCents += config::centPerSemitone * transpose; // sample transpose
|
pitchVariationInCents += config::centPerSemitone * transpose; // sample transpose
|
||||||
pitchVariationInCents += static_cast<int>(velocity * pitchVeltrack); // track velocity
|
pitchVariationInCents += static_cast<int>(velocity) * pitchVeltrack; // track velocity
|
||||||
pitchVariationInCents += pitchDistribution(Random::randomGenerator); // random pitch changes
|
pitchVariationInCents += pitchDistribution(Random::randomGenerator); // random pitch changes
|
||||||
return centsFactor(pitchVariationInCents);
|
return centsFactor(pitchVariationInCents);
|
||||||
}
|
}
|
||||||
|
|
@ -994,7 +994,7 @@ float sfz::Region::getPhase() const noexcept
|
||||||
float phase;
|
float phase;
|
||||||
if (oscillatorPhase >= 0) {
|
if (oscillatorPhase >= 0) {
|
||||||
phase = oscillatorPhase * (1.0f / 360.0f);
|
phase = oscillatorPhase * (1.0f / 360.0f);
|
||||||
phase -= static_cast<int>(phase);
|
phase -= static_cast<float>(static_cast<int>(phase));
|
||||||
} else {
|
} else {
|
||||||
std::uniform_real_distribution<float> phaseDist { 0.0001f, 0.9999f };
|
std::uniform_real_distribution<float> phaseDist { 0.0001f, 0.9999f };
|
||||||
phase = phaseDist(Random::randomGenerator);
|
phase = phaseDist(Random::randomGenerator);
|
||||||
|
|
|
||||||
|
|
@ -407,13 +407,13 @@ bool sfz::Synth::loadSfzFile(const fs::path& file)
|
||||||
noteActivationLists[note].push_back(region);
|
noteActivationLists[note].push_back(region);
|
||||||
}
|
}
|
||||||
|
|
||||||
for (unsigned cc = 0; cc < config::numCCs; cc++) {
|
for (int cc = 0; cc < config::numCCs; cc++) {
|
||||||
if (region->ccTriggers.contains(cc) || region->ccConditions.contains(cc))
|
if (region->ccTriggers.contains(cc) || region->ccConditions.contains(cc))
|
||||||
ccActivationLists[cc].push_back(region);
|
ccActivationLists[cc].push_back(region);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Defaults
|
// Defaults
|
||||||
for (unsigned cc = 0; cc < config::numCCs; cc++) {
|
for (int cc = 0; cc < config::numCCs; cc++) {
|
||||||
region->registerCC(cc, resources.midiState.getCCValue(cc));
|
region->registerCC(cc, resources.midiState.getCCValue(cc));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -1026,12 +1026,12 @@ void sfz::Synth::resetAllControllers(int delay) noexcept
|
||||||
resources.midiState.resetAllControllers(delay);
|
resources.midiState.resetAllControllers(delay);
|
||||||
for (auto& voice : voices) {
|
for (auto& voice : voices) {
|
||||||
voice->registerPitchWheel(delay, 0);
|
voice->registerPitchWheel(delay, 0);
|
||||||
for (unsigned cc = 0; cc < config::numCCs; ++cc)
|
for (int cc = 0; cc < config::numCCs; ++cc)
|
||||||
voice->registerCC(delay, cc, 0.0f);
|
voice->registerCC(delay, cc, 0.0f);
|
||||||
}
|
}
|
||||||
|
|
||||||
for (auto& region : regions) {
|
for (auto& region : regions) {
|
||||||
for (unsigned cc = 0; cc < config::numCCs; ++cc)
|
for (int cc = 0; cc < config::numCCs; ++cc)
|
||||||
region->registerCC(cc, 0.0f);
|
region->registerCC(cc, 0.0f);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue