Interrupting Playcomlpete (Wave Shield)
Moderators: adafruit_support_bill, adafruit

Re: Interrupting Playcomlpete (Wave Shield)

by xl97 on Fri Dec 28, 2012 2:52 pm

or still use your playComplete() function... like so:

Code: Select all | TOGGLE FULL SIZE
// Plays a full file from beginning to end with no pause.
void playcomplete(char *name) {
  // call our helper to find and play this name
  while (wave.isplaying) {
    // audio clip is playing..careful when putting code in here to execute
    // if the audio stops first..youre stick in 'here' until your actions are done
    // if actions here end first..might not mesh-up with the audio ending
  // audio is done playing.. trigger/do whatever now

I believe same results... :)
Posts: 144
Joined: Mon Jul 27, 2009 12:51 pm