Optimize more by avoiding floating point

This commit is contained in:
Dejvino
2026-03-01 14:26:18 +01:00
parent 8cc8898c01
commit 534a7512c4
3 changed files with 32 additions and 27 deletions
+1 -1
View File
@@ -12,7 +12,7 @@ const int I2S_LRC_PIN = 10; // Left-Right Clock (GP10)
const int I2S_DOUT_PIN = 11; // Data Out (GP11)
// Audio parameters
const int SAMPLE_RATE = 44100 / 2 / 2 / 2;
const int SAMPLE_RATE = 44100 / 4;
const int16_t AMPLITUDE = 16383 / 2; // Use a lower amplitude to avoid clipping (max is 32767 for 16-bit)
// Create an I2S output object