Programming problem

I have a question about the arduino due connect SD card ,use it to play music but Not read SD card ?
What is my sd card pin for errors or circuit fault?
I made reference to these sites
my Serial monitor show"Initializing SD card… failed! error opening test.wav"
My DUE pin connector SD card using ICSP-1, ICSP-3, ICSP-4 and pwm-4

my Program


 Demonstrates the use of the Audio library for the Arduino Due

 Hardware required :
 *Arduino shield with a SD card on CS 4 (the Ethernet sheild will work)
 *Speaker attched to ground and DAC0

 Original by Massimo Banzi September 20, 2012
 Modified by Scott Fitzgerald October 19, 2012


#include <SD.h>
#include <SPI.h>
#include <Audio.h>

void setup()
  // debug output at 9600 baud

  // setup SD-card
  Serial.print("Initializing SD card...");
  if (!SD.begin(4)) {
    Serial.println(" failed!");
  Serial.println(" done.");
  // hi-speed SPI transfers

  // 44100 Hz stereo => 88200 sample rate
  // 100 mSec of prebuffering.
  Audio.begin(88200, 100);

void loop()
  int count=0;

  // open wave file from sdcard
  File myFile ="test.wav");
  if (!myFile) {
    // if the file didn't open, print an error and stop
    Serial.println("error opening test.wav");
    while (true);

  const int S=1024; // Number of samples to read in block
  short buffer[S];

  // until the file is not finished
  while (myFile.available()) {
    // read from the file into buffer, sizeof(buffer));

    // Prepare samples
    int volume = 1023;
    Audio.prepare(buffer, S, volume);
    // Feed samples to audio
    Audio.write(buffer, S);

    // Every 100 block print a '.'
    if (count == 100) {
      count = 0;

  Serial.println("End of file. Thank you for listening!");
  while (true) ;