earlephilhower / arduino-pico

Raspberry Pi Pico Arduino core, for all RP2040 boards
GNU Lesser General Public License v2.1
1.88k stars 394 forks source link

Fix PWMAudio::write(buffer, len) #2202

Closed earlephilhower closed 1 month ago

earlephilhower commented 1 month ago

PWMAudio was only ever writing one half the buffer passed in because of an off-by-2 error. Fixes the sine output in KeyboardPiano.