Fix overflow with x256 oversampling in I2SNoDAC (#543)

Fixes #542
This commit is contained in:
Earle F. Philhower, III authored and GitHub committed 2022-06-14 08:23:22 -07:00
1 parent c4bf70bccf
commit 02225bcaa9
1 file changed
+1 -1
+1 -1
View File
@@ -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 */