short version: im getting alot of noise from my speaker during playback
im using the TMRpcm library to play .wav files from the SD card and an arduino uno. I've read through everything I could find on google from decoupling capacitors and low pass filters and other such suggestions. As for the library i uncommented the recommended settings and changed the quality to 0. I also made the audio file size 8khz to avoid possible buffering issues. I've made sure it otherwise meets the library specs.
I suspect its an issue with the amp itself because I've swapped it for a LM386 amp and it works fine, its just too quiet. I've tried soldering a new class D amp and I get the exact same problem. I've made sure the solder points are good and not affecting anything else on the board.
I had suspicions that only using 1 channel of the amplifier was causing the problem but I was informed by others that this is not the case. To clarify I'm only using the left channel and speaker and the ground. the right channel input and output having nothing connected at all.
The feedback only happens when the sound is playing, its otherwise pretty quiet (if you listen closely you can barely hear a humming sound). I also in the programming turn off (low) Pin 9 on the arduino (the line output to the speaker).
I think that covers everything I've tried. I'm going to upload a schematic when I get a chance, at least I'm going to try. This is my first project I'm attempting by myself without a tutorial so I don't know much but I've tried everything I can think of and its starting to drive me mad.
Thanks for your time and sorry for the long post!