From 02225bcaa9e29ff1bace7afe04c976afc6b98cbf Mon Sep 17 00:00:00 2001 From: "Earle F. Philhower, III" Date: Tue, 14 Jun 2022 08:23:22 -0700 Subject: [PATCH] Fix overflow with x256 oversampling in I2SNoDAC (#543) Fixes #542 --- src/AudioOutputI2SNoDAC.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/AudioOutputI2SNoDAC.h b/src/AudioOutputI2SNoDAC.h index de47595..ef29982 100644 --- a/src/AudioOutputI2SNoDAC.h +++ b/src/AudioOutputI2SNoDAC.h @@ -43,7 +43,7 @@ class AudioOutputI2SNoDAC : public AudioOutputI2S protected: virtual int AdjustI2SRate(int hz) override { return hz * oversample/32; } - uint8_t oversample; + int oversample; void DeltaSigma(int16_t sample[2], uint32_t dsBuff[4]); typedef int32_t fixed24p8_t; enum {fixedPosValue=0x007fff00}; /* 24.8 of max-signed-int */