New library for PWM playback from SD cards: SimpleSDAudio

timberwolf9:
Don't quote me on this, but from looking at the code, I think you could do such given that you make a call to the SdPlay.worker() function often enough to keep the buffer filled. I'm not sure how much of the processor is left once playing audio, but it seems you could squeeze in a few other non time dependent things. (Like adding up time or checking for a button and updating its state...simple things)

From what I have gathered, the SdPlay.worker() function reads the next sector of the sdcard into a buffer. So if you call it often enough, you should be okay, just don't ask for anything that needs a ton of resources while playing audio.

Feel free to correct me if I'm wrong, but this is what I have gathered so far.

Edit: Just from playing with the serial I can see what you are saying, but I haven't come up with a solution.
Edit2: If you hear the skip when using serial at 9600, move it to a higher speed. I'm running at 115200 just to see, and there isn't a noticeable skip when using the serial commands in the demo.

No you are right, my thoughts exactly (about buffer). I also guessed that increasing baud rate will improve things, but never tested it so you just proved it :slight_smile: It makes sense. However I'm just wondering how did they pull off the trick with WaveShield? I can do lots of heavy things with microprocessor while wave is playing, it never skips a beat... Can same be accomplished with this library? :slight_smile: Or because there's no DAC it's impossible to do? I'm curious to hear what author thinks.