Wave files Arduino Due Extruded Warbling Sound

Utilizing the project http://arduino.cc/en/Tutorial/SimpleAudioPlayer I can successfully play wav files with each loop of the code. When attempting to play subsequent files without restarting the loop, these files always have an extruded warbling sound. Any ideas?

IBv2_warbling_wav.txt (29.5 KB)

No idea about your stated problem but your real problem is that you need to learn to make that coda a way way lot shorter.
Use a for loop to set the pin mode for all those pins.
Use a function to do the playing and pass the parameter you want to use into the function.

When you have removed all that turgid code then maybe it will be possible to see what you are doing wrong.
I can't see where you are ever stopping the sound production, just closing the file will not do that.

Is extruded warbling sound what an extruded warbler sings?

Mike, I am in complete agreement that the code submitted is treacherous.
So I tried this… I took the sample code [Massimo Banzi and Scott Fitzgerald] doubled it, and added a one second wait in between the two audio play sections. I get the same results with the distorted sound on the second go around. I also agree with your statement that I am not stopping the audio playback. I have not seen any commands to use to do so. Any direction on this would be most appreciated.

wavfile_test.txt (2.38 KB)