Exemplo n.º 1
0
void playcomplete(char *name) {
  uint16_t potval;
  uint32_t newsamplerate;
  
  playfile(name);
  samplerate = wave.dwSamplesPerSec;
  while (wave.isplaying) {     
	// you can do stuff here!
	delay(500);
   }
  card.close_file(f);
}
Exemplo n.º 2
0
void playfile(char *name) {
   if (f) {
      card.close_file(f);
    }
   f = card.open_file(name);
   if (!f) {
      putstring(" Couldn't open file: " );
      Serial.println(name);
      delay(500);
      return;
   }
   if (!wave.create(f)) {
     Serial.println(" Not a valid WAV"); return;
   }
   wave.play();
}