TMRpcm library

I have a micro SD card with wav files. All 8 bit, 16000Hz, Mono. I have the Basic.ino sample program loaded and change file name to 0.wav which is where my list starts.

No sound.

I tested my speaker with tone(9,2000) That works, I get the tone.

Back to Basic.ino, won't play 0.wav or anything I rename etc...

I added the #define debug to TMRpcm.h and did not get any new information to Serial port.

I added my debuggin to the .h file and here is where it stops:

boolean TMRpcm::wavInfo(char* filename){

  //check for the string WAVE starting at 8th bit in header of file
  #if !defined (SDFAT)
  sFile = SD.open(filename);
  #else
  sFile.open(filename);
  #endif

  if( !ifOpen() ){ 
  		  #if defined (debug)
		  	Serial.println("Not Open");
		  #endif
	return 0; 
  }
.... rest of code here.....

Now I get the "Not Open" message. Ok, so I loaded an example from SD and it will list my entire contents of the SD card. I then loaded dumpfile.ino and had it dum 0.wav to the serial port and that works great.

So the SD card is ok, I looked at the binary image of the .wav file and it has all the needed parts. The library will not open the file and then reports it as not open and quits.

IsPlaying is high after I start the play and never drops low but no sound.

Anything else I can try.

I'll put my program here but it's just the Basic.ino program...

#include <SD.h>                      // need to include the SD library
//#define SD_ChipSelectPin 53  //example uses hardware SS pin 53 on Mega2560
#define SD_ChipSelectPin 4  //using digital pin 4 on arduino nano 328, can use other pins
#include <TMRpcm.h>           //  also need to include this library...
#include <SPI.h>

TMRpcm tmrpcm;   // create an object for use in this sketch


void setup(){

  tmrpcm.speakerPin = 9; //5,6,11 or 46 on Mega, 9 on Uno, Nano, etc

  Serial.begin(9600);
  if (!SD.begin(SD_ChipSelectPin)) {  // see if the card is present and can be initialized:
    Serial.println("SD fail");  
    return;   // don't do anything more if not
  }
  tmrpcm.play("0.wav"); //the sound file "music" will play each time the arduino powers up, or is reset
}



void loop(){  

  if(Serial.available()){    
    if(Serial.read() == 'p'){ //send the letter p over the serial monitor to start playback
      tmrpcm.play("0.wav");
    }
  }

}

Try:

if(Serial.available() > 0){