New library for PWM playback from SD cards: SimpleSDAudio

Tuttut:
Hi, I will try answer some of your questions:

@timberwolf9:
Why the argument -r 64000? If you use a 16 MHz Arduino, it should be 16 MHz / 256 = 62500. But anyway, the sound is just a little bit to slow then...

@bratan & timberwolf9:
I will tell you some internal details about my library: The library uses a ring buffer of 1024 bytes when no work buffer is set manually. As the buffer is filled in one sector blocks of 512 bytes each, the buffer became a ping-pong buffer in most cases. With 512 bytes, at 8-Bit/Mono/62.5kHz that is about 8ms time, because the data reading from sd-card also takes some time, your observation of 5ms max delay between worker()-calls is very realistic.

@Tuttut
"-r 64000" gives reasonably good audio on my arduino uno, it may be my setup that has gone wonk, but when converting using the rate you gave, the audio was always really high pitched and fast moving. So I played around with the terminal options for sox and found that to be a sweet spot where the audio tone and play speed are warm and spot on.

If I read the internals correctly, we could get away with performing micro task once the audio is playing. 704 is not a lot of RAM to play with, but for listening to the network and flashing a light, it may be enough. (704 is more than enough for flashing a light...I would think)

Also, Tuttut, I ran into the 49 error code on my card until I did a FAT format. Once that was done, everything else went smooth as butter.