|
|
|
|
@ -35,7 +35,7 @@ void CallDelay::fail(const char* reason) {
|
|
|
|
|
void CallDelay::reset() { |
|
|
|
|
st.clear(); st.setTempo(1); |
|
|
|
|
spanHead = spanCount = trim = 0; |
|
|
|
|
written = cursor = generated = consumed = stBase = stFed = entry = queuedInput = elapsed = deviceSamples = 0; |
|
|
|
|
written = cursor = generated = consumed = stBase = stFed = entry = queuedInput = deviceSamples = 0; |
|
|
|
|
phaseGoal = 0; |
|
|
|
|
playedSource = cutPhase = 0; tempo = 1; |
|
|
|
|
for (auto& b : buckets) b = {}; |
|
|
|
|
@ -175,7 +175,7 @@ unsigned CallDelay::direct(int16_t* out, unsigned count, unsigned reserve, unsig
|
|
|
|
|
|
|
|
|
|
/* Нижняя огибающая за 150..200мс убирает пилу пакетизации без зависимости от размера pull. */ |
|
|
|
|
double CallDelay::lowDepth(double depth, double& inventory) { |
|
|
|
|
uint64_t time = elapsed / (Rate / 20); |
|
|
|
|
uint64_t time = deviceSamples / (Rate / 20); |
|
|
|
|
auto& b = buckets[time % 4]; |
|
|
|
|
if (b.time != time) b = {time, depth, inventory}; |
|
|
|
|
else { b.low = std::min(b.low, depth); b.inventory = std::min(b.inventory, inventory); } |
|
|
|
|
@ -227,6 +227,5 @@ unsigned CallDelay::pull(int16_t* out, unsigned count, uint64_t queued, unsigned
|
|
|
|
|
consume(n); done += n; deviceSamples += n; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
elapsed += count; |
|
|
|
|
return done; |
|
|
|
|
} |
|
|
|
|
|