In this Discussion

Use of If and Else conditional to make sound pause and play.

Hello! I am almost complete with my project. I have decided to use the keyboard function to have a certain key play a sound.
I have gotten as far as that. But, I am stuck at how to pause the sound and also play for the same key.
For Example: if you press a letter once, it'll play, and if you do it again, it'll pause it and so forth.

I've tried to use filename.rewind(); but that doesn't help from all my sounds playing at once.

Hi Kfrager!
You're correct, if you press all the specified Keys, then all the sounds will play at once. I don't mind having that as an option, I would just like to know how to make them turn off or pause.

Check the spelling of the filename. Double check. You can also create a small sketch loading that specific file and trying it out by itself. Or see if you can get the file from another source or use an alternative, at least for testing. It is not unheard of for a file to be corrupt.