SPI and SD libraries?

Hie everyone, i am trying to make an mp3 player through an sd card and a vs1003 breakout board. i got the sine test to work on the board and i also am able to read the mp3 file from the sd card. using the sd library and the spi library. But on separate programs. as soon as i try to combine them to play the song neither one works. I’m not sure that it’s how the sd library is set up or how it works.

anyways heres the code:

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

File myFile;

int CS_pin = 9;
int DCS_pin = 8;
int DREQ_pin = 7;
int XRST_pin = 6;
byte received;

void setup()
{
 pinMode(CS_pin, OUTPUT);
 pinMode(DREQ_pin, INPUT);
 pinMode(DCS_pin, OUTPUT);
 pinMode(XRST_pin, OUTPUT);
 pinMode(10, OUTPUT);
 
 Serial.begin(9600);
  Serial.print("Initializing SD card...");
  
  if (!SD.begin(10)) {
    Serial.println("initialization failed!");
    return;
  }
  Serial.println("initialization done.");
  
  myFile = SD.open("song1.mp3");
  if (myFile) {
    Serial.println("song1.mp3 succesfully opened!");
  } else {
  	// if the file didn't open, print an error:
    Serial.println("error opening test.txt");
  }
 
 SPI.begin();
 SPI.setBitOrder(MSBFIRST);
 //CPOL = 0, CPHA = 1
 //see en.wikipedia.org/wiki/Serial_Peripheral_Interface_Bus#Mode_Numbers
 //and decoder chip datasheet
 SPI.setDataMode(SPI_MODE1);
 //max SDI clock freq = CLKI/7 and (datasheet) CLKI = 36.864, hence max clock = 5MHz
 //SPI clock arduino = 16MHz. 16/ 4 = 4MHz -- ok!
 SPI.setClockDivider(SPI_CLOCK_DIV4);

}

void loop()
{
 digitalWrite(XRST_pin, LOW);
 delay(100);
 
 digitalWrite(CS_pin, HIGH);
 digitalWrite(DCS_pin, HIGH);
 digitalWrite(XRST_pin, HIGH);
 delay(5);

 // CHIP Write
 // sets sci_mode register, SM_SDINEW, SM_TESTS.  pg 25, 26
 byte aux;
 digitalWrite(CS_pin, LOW);
 delay(1);
 SPI.transfer(0x02);  //write command
 SPI.transfer(0x00); //SDI_MODE register
 //extract and send higher byte of data
 //0x0400
 aux = 0x0820 >> 8;
 SPI.transfer(aux);
 //extract and send lower byte of data
 aux = 0x0820 & 0b11111111;
 SPI.transfer(aux);
 //wait for the chip to finish executing command
 while (!DREQ_pin){};
 digitalWrite(CS_pin, HIGH);
 delay(1);
 
 digitalWrite(DCS_pin, LOW);
     
 // read from the file until there's nothing else in it:
 while (myFile.available()) {
    Serial.write(myFile.read());
 }
 // close the file:
 myFile.close();
 
 digitalWrite(DCS_pin, HIGH);
}

i also have the sdfat library, idk if that would be a little easier to use or if i have to learn the adi protocol for the sd card. please help.

It uses the VS1033 decoder instead of the VS1003, it also uses a microSD card, the source code works with ATmega644 and Teensy++, so it's the perfect example to look at