I'm stumped!
When I use "aplay" to play a .wav file on my pi from the command line it works perfectly most of the time, however sometimes I get very loud static that eventually stops. There doesn't seem to be any pattern to it. I can play the same wav several times in a row and then it'll just be a loud hiss as if it's started trying to play some random file rather than a wave form.
I am using a cheap and cheerful USB sound card rather than the onboard sound - but I can't see how that would matter.
Over the weekend I set up a capacitive touch fruit and veg piano for my children. It was really fun but somewhat spoiled by this issue.
Any ideas what could be causing it and how to fix it?