I'm having an issue with files being corrupted on my SD card. I powered up my board this evening, and after working flawlessly the last couple days, I suddenly started hearing static while playing this looping hum sound effect. I wiggled my audio cables to no avail, and even plugged in a speaker directly to my project just to make sure it was the audio cable going to my amp which was the issue, but I still got the static. I then remembered that a while back I had a similar issue which I'd chalked up to having stuck new files on the SD card without formatting it first, and I overwrote the files without actually checking to see if they were corrupted, which someone had suggested might be the problem. So this time I copied the files off the SD card and loaded them into my sound editing program, and lo and behold in my looping sound effect there are repeating regions of static. And not single pops and clicks here and there, but regular sections of noise, each 200ms, and spaced 400ms apart.
I can't imagine what would cause this. They don't seem spaced in such a way that it would be related to the sample buffer being filled. (it's only 512 bytes) And with my LED modules being updated at 60hz (one update where I send 72 bytes every 16ms) the gaps are much too large to be related to that either. I'm also not writing to the card, and no other files other than this one looping file that plays 90% of the time is corrupted. Also, my SD card, DAC, and LEDs are all on separate data busses and everything worked fine until this one file decided to suddenly become corrupted.
Has anyone who has used the WaveHC lib experienced anything like this?
I guess my next step will be to try to find some kind of SD card testing application to see if the card itself is broken. I would test with a new card but the problem happens so rarely it could be weeks before I see it again.