Better location rounding in resample code

This commit is contained in:
Snesrev
2022-09-11 12:36:11 +02:00
parent cdc0e155b8
commit a89f5606f2

View File

@@ -637,7 +637,7 @@ void dsp_write(Dsp *dsp, uint8_t adr, uint8_t val) {
void dsp_getSamples(Dsp* dsp, int16_t* sampleData, int samplesPerFrame, int numChannels) {
// resample from 534 samples per frame to wanted value
float adder = 534.0 / samplesPerFrame;
float location = 0.0;
float location = 0.5f;
if (numChannels == 1) {
for (int i = 0; i < samplesPerFrame; i++) {