fix synthpp_sampler reset + more default c++ reset values in bw_sampler

This commit is contained in:
Stefano D'Angelo 2025-09-28 21:27:31 +02:00
parent 1a36a91915
commit 182748e6f8
2 changed files with 4 additions and 4 deletions

View File

@ -83,7 +83,7 @@ void impl_reset(impl handle) {
const size_t sampleLength[1] = {instance->sampleLength};
instance->sampler.reset(sample, sampleLength);
#else
instance->sampler.reset({instance->sample}, {instance->sampleLength}, 0.f, {BW_NULL});
instance->sampler.reset({instance->sample}, {instance->sampleLength});
#endif
instance->gain.reset();
instance->ppm.reset();
@ -130,7 +130,7 @@ void impl_process(impl handle, const float **inputs, float **outputs, size_t n_s
instance->sampler.setRate((1.f / 440.f) * instance->masterTune * bw_pow2f(8.333333333333333e-2f * (instance->note - 69)));
instance->sampler.process({instance->sample}, {instance->sampleLength}, {outputs[0]}, n_samples);
} else
instance->sampler.reset({instance->sample}, {instance->sampleLength}, 0.f, {BW_NULL}); // sloppy but simple coding
instance->sampler.reset({instance->sample}, {instance->sampleLength}); // sloppy but simple coding
#endif
instance->gain.process(outputs, outputs, n_samples);
instance->ppm.process(outputs, nullptr, n_samples);

View File

@ -707,8 +707,8 @@ public:
void reset(
std::array<const float * BW_RESTRICT, N_CHANNELS> sample,
std::array<size_t, N_CHANNELS> sampleLength,
float pos0,
std::array<float, N_CHANNELS> * BW_RESTRICT y0);
float pos0 = 0.f,
std::array<float, N_CHANNELS> * BW_RESTRICT y0 = BW_NULL);
# endif
void reset(