shithub: zelda3

Download patch

ref: 352c33c9ed18be9d7658e696cc876afbafee9fb6
parent: ce49c3f9d82b95fd032a5903a67465dfab357a9a
author: Snesrev <snesrev@protonmail.com>
date: Mon Sep 5 20:31:16 EDT 2022

Change dsp_getSamples to use float instead of double

--- a/snes/dsp.c
+++ b/snes/dsp.c
@@ -635,8 +635,8 @@
 
 void dsp_getSamples(Dsp* dsp, int16_t* sampleData, int samplesPerFrame) {
   // resample from 534 samples per frame to wanted value
-  double adder = 534.0 / samplesPerFrame;
-  double location = 0.0;
+  float adder = 534.0 / samplesPerFrame;
+  float location = 0.0;
   for(int i = 0; i < samplesPerFrame; i++) {
     sampleData[i * 2] = dsp->sampleBuffer[((int) location) * 2];
     sampleData[i * 2 + 1] = dsp->sampleBuffer[((int) location) * 2 + 1];