Help with Adafruit wave shield 1.1 with Arduino 0022?

Noob here. Just assembled a wave shield, formatted SD card, loaded some .wav files, downloaded the AF_Wave libraries and tried to run this code:

#include <AF_Wave.h>
#include <avr/pgmspace.h>
#include "util.h"
#include "wave.h"

AF_Wave card;
File f;
Wavefile wave;      // only one!

#define redled 9

uint16_t samplerate;

void setup() {
  Serial.begin(9600);           // set up Serial library at 9600 bps
  Serial.println("Wave test!");

  pinMode(2, OUTPUT); 
  pinMode(3, OUTPUT);
  pinMode(4, OUTPUT);
  pinMode(5, OUTPUT);
  pinMode(redled, OUTPUT);
  if (!card.init_card()) {
    putstring_nl("Card init. failed!"); return;
  if (!card.open_partition()) {
    putstring_nl("No partition!"); return;
  if (!card.open_filesys()) {
    putstring_nl("Couldn't open filesys"); return;

 if (!card.open_rootdir()) {
    putstring_nl("Couldn't open dir"); return;

  putstring_nl("Files found:");

void ls() {
  char name[13];
  int ret;
  putstring_nl("Files found:");
  while (1) {
    ret = card.get_next_name_in_dir(name);
    if (!ret) {

uint8_t tracknum = 0;

void loop() { 
   uint8_t i, r;
   char c, name[15];

   // scroll through the files in the directory
   for (i=0; i<tracknum+1; i++) {
     r = card.get_next_name_in_dir(name);
     if (!r) {
       // ran out of tracks! start over
       tracknum = 0;
   putstring("\n\rPlaying "); Serial.print(name);
   // reset the directory so we can find the file

void playcomplete(char *name) {
  uint16_t potval;
  uint32_t newsamplerate;
  samplerate = wave.dwSamplesPerSec;
  while (wave.isplaying) {     
	// you can do stuff here!

void playfile(char *name) {
   f = card.open_file(name);
   if (!f) {
      putstring_nl(" Couldn't open file"); return;
   if (!wave.create(f)) {
     putstring_nl(" Not a valid WAV"); return;
   // ok time to play!;

But no audio plays back and receive this in the Serial Monitor:

Wave test!
Card init. failed!


Is the SD card formatted correctly? Is it a 2G one, I think there is trouble with some older smaller cards. Have you soldered all the joints, inspect them very closely some might look soldered but close inspection will show they are not.

All of the solders appear good. The card is formatted correctly, at least according to the instructions on the Adafruit site. But, it was a 2G Micro. Just tested it with another SD card and returned the same error.

So I downloaded the WaveHC library and ran a test. Got this in the Serial Monitor:

card.init failed
SD error
errorCode: 1
errorData: 0

It is either the SD card or more likely a construction error. I can't think of anything else. These things do work. Can you check the signals on an oscilloscope, it might point to the connection with the error.

Got it! It was a bad solder somewhere. Everything looked good and nothing showed up with a multimeter test. So I went back through and hit any questionable welds with an iron. Sound! Thanks for the help!