vs1053 + keypad: mp3 code

Hello all, this is my first post here…
I learned all i know about arduino in this pasteboards… this time i really have to post the problem…
Got all the code from Bill Porter library… and from Michael Flaga sketch…
I got the above sketch that controls volume, call some mp3 files, do the back and the after…

The case 6 is my problem here. It plays a sequence of files all the way thru… but while it doesn’t complete the (for cycle) the other buttons doesn’t work stoping the music and doing their action.

Any help is appreciated, tank you

#include <Keypad.h>
#include <SPI.h>
#include <SdFat.h>
#include <SdFatUtil.h>
#include <SFEMP3Shield.h>

SdFat sd;
SFEMP3Shield MP3player;

long randNumber;
int trackNumber = 2;

const byte ROWS = 4;
const byte COLS = 3;

char keys[ROWS][COLS] = {
{‘1’,‘2’,‘3’},
{‘4’,‘5’,‘6’},
{‘7’,‘8’,‘9’},
{’*’,‘0’,’#’}
};

byte rowPins[ROWS] = {A0,A1,A2,A3};
byte colPins[COLS] = {A4,A5,3};

Keypad kpd = Keypad( makeKeymap(keys), rowPins, colPins, ROWS, COLS );

void setup()
{
Serial.begin(9600);
sd.begin(SD_SEL, SPI_HALF_SPEED);
MP3player.begin();
}

void loop() {

char key = kpd.getKey();
if(key != NO_KEY)
{
switch (key)
{

case ‘1’:
if(MP3player.isPlaying()) MP3player.stopTrack();
MP3player.playMP3(“track001.mp3”);
break;
case ‘2’:
if(MP3player.isPlaying()) MP3player.stopTrack();
MP3player.playMP3(“track002.mp3”);
break;
case ‘3’:
if(MP3player.isPlaying()) MP3player.stopTrack();
MP3player.playMP3(“track003.mp3”);
break;
case ‘4’:
if(MP3player.isPlaying()) MP3player.stopTrack();
MP3player.playMP3(“track004.mp3”);
break;
case ‘5’:
if(MP3player.isPlaying()) MP3player.stopTrack();
MP3player.playMP3(“track005.mp3”);
break;
case ‘6’:
if(MP3player.isPlaying()) MP3player.stopTrack();
for (trackNumber=1; trackNumber <= 4; trackNumber++) {
if(!MP3player.playTrack(trackNumber))
{ while (MP3player.isPlaying());
MP3player.stopTrack(); } }
break;
case ‘7’:
if(MP3player.isPlaying()) {MP3player.stopTrack();}
MP3player.playTrack(trackNumber);
trackNumber–;
if(trackNumber < 1) {
trackNumber = 30;
}
break;
case ‘8’:
randNumber = random(1, 40);
if(MP3player.isPlaying()) MP3player.stopTrack();
MP3player.playTrack(randNumber);
break;
case ‘9’:
union twobyte mp3_vol; // Cria dois bytes um para cada lado
mp3_vol.word = MP3player.getVolume();
if(mp3_vol.byte[1] <= 2)
{
mp3_vol.byte[1] = 2;
}
else {
mp3_vol.byte[1] -= 2;
}
MP3player.setVolume(mp3_vol.byte[1], mp3_vol.byte[1]); // Altera o valor do volume nos dois lados (L e R)
break;
case ‘*’:
if( MP3player.getState() == playback) {
MP3player.pauseMusic(); }
else if( MP3player.getState() == paused_playback) { MP3player.resumeMusic(); }
break;
case ‘0’:
union twobyte mp3_vol2; // Cria dois bytes um para cada lado
mp3_vol2.word = MP3player.getVolume();
if(mp3_vol2.byte[1] >= 254)
{
mp3_vol2.byte[1] = 254;
}
else {
mp3_vol2.byte[1] += 2;
}
MP3player.setVolume(mp3_vol2.byte[1], mp3_vol2.byte[1]); // Altera o valor do volume nos dois lados (L e R)
break;
case ‘#’:
if(MP3player.isPlaying()) {MP3player.stopTrack();}
MP3player.playTrack(trackNumber);
trackNumber++;
if(trackNumber > 30) {
trackNumber = 1;
}
break;
}
}
}