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();
|
||||
promise->filename = preloaded->first;
|
||||
promise->preloadedData = preloaded->second.preloadedData;
|
||||
promise->sampleRate = preloaded->second.information.sampleRate;
|
||||
promise->sampleRate = static_cast<float>(preloaded->second.information.sampleRate);
|
||||
promise->oversamplingFactor = oversamplingFactor;
|
||||
promise->creationTime = std::chrono::high_resolution_clock::now();
|
||||
|
||||
|
|
|
|||
|
|
@ -137,7 +137,7 @@ void sfz::MidiState::reset() 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);
|
||||
|
||||
pitchBend = 0;
|
||||
|
|
|
|||
|
|
@ -176,7 +176,7 @@ private:
|
|||
* Pitch bend status
|
||||
*/
|
||||
int pitchBend { 0 };
|
||||
double sampleRate { config::defaultSampleRate };
|
||||
float sampleRate { config::defaultSampleRate };
|
||||
int samplesPerBlock { config::defaultSamplesPerBlock };
|
||||
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
|
||||
pitchVariationInCents += tune; // sample tuning
|
||||
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
|
||||
return centsFactor(pitchVariationInCents);
|
||||
}
|
||||
|
|
@ -994,7 +994,7 @@ float sfz::Region::getPhase() const noexcept
|
|||
float phase;
|
||||
if (oscillatorPhase >= 0) {
|
||||
phase = oscillatorPhase * (1.0f / 360.0f);
|
||||
phase -= static_cast<int>(phase);
|
||||
phase -= static_cast<float>(static_cast<int>(phase));
|
||||
} else {
|
||||
std::uniform_real_distribution<float> phaseDist { 0.0001f, 0.9999f };
|
||||
phase = phaseDist(Random::randomGenerator);
|
||||
|
|
|
|||
|
|
@ -407,13 +407,13 @@ bool sfz::Synth::loadSfzFile(const fs::path& file)
|
|||
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))
|
||||
ccActivationLists[cc].push_back(region);
|
||||
}
|
||||
|
||||
// Defaults
|
||||
for (unsigned cc = 0; cc < config::numCCs; cc++) {
|
||||
for (int cc = 0; cc < config::numCCs; cc++) {
|
||||
region->registerCC(cc, resources.midiState.getCCValue(cc));
|
||||
}
|
||||
|
||||
|
|
@ -1026,12 +1026,12 @@ void sfz::Synth::resetAllControllers(int delay) noexcept
|
|||
resources.midiState.resetAllControllers(delay);
|
||||
for (auto& voice : voices) {
|
||||
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);
|
||||
}
|
||||
|
||||
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);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue