Mp3-shield and inconsistent volume

Hi!
Im working a a small UNO audio device with a custom keypad. The goal is to play different sounds with different passwords. As a reset button I use the Reset pin on the arduino. Kinda harsch reset and maybe potentially harmful for the audio files which can be playing when I restet the device? But I couldn’t think of a better way to stop the audio and reset the password since I didn’t get the audio to start again after I’ve used MP3player.stopTrack();.

But my real issue right now is that the volume is very inconsistent in between resets. Sometimes is really ear-deafening-loud and after a reset it could be really quiet and hard to hear at all. How come?

Heres the full code. I’ve cut bits and pieces from existing examples I’ve found on the internet so it might be some loose ends here and there.

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


int currentLength = 0; //defines which number we are currently writing

char entered[5];

const byte ROWS = 4; //four rows
const byte COLS = 4; //three columns
char keys[ROWS][COLS] = {
  {'2', '2', '3', '1'},
  {'5', '6', 'B', '4'},
  {'7', '9', '8', '7'},
  {'*', '#', '0', '*'}
};
byte rowPins[ROWS] = {10, 5, 4, 3}; //connect to the row pinouts of the keypad
byte colPins[COLS] = {A0, A1, A2, A3}; //connect to the column pinouts of the keypad


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

#define BUTTON_DEBOUNCE_PERIOD 20 //ms


SdFat sd;

SFEMP3Shield MP3player;



void setup() {


  Serial.begin(9600);

  if (!sd.begin(9, SPI_HALF_SPEED)) sd.initErrorHalt();
  if (!sd.chdir("/")) sd.errorHalt("sd.chdir");

  MP3player.begin();
  //MP3player.setMonoMode(1);
  MP3player.setVolume(10,10);
  
  Serial.println("Waiting");
  
 MP3player.playTrack(4);
}

void loop()
{

  char key2 = keypad.getKey(); // get the key

  if (key2 == '*')
  {
    MP3player.stopTrack();
    

    while (currentLength < 5)
    {



      char key2 = keypad.getKey();
      if (key2 == '#')
      {
        currentLength = 0;
        
      }
       else if (key2 != NO_KEY)
      {


        entered[currentLength] = key2;
        currentLength++;

      }
    }

    if (currentLength == 5)
    {
      if (entered[0] == '0' && entered[1] == '5' && entered[2] == '4' && entered[3] == '7' && entered[4] == '5')

      {
        
        MP3player.playTrack(1);
        MP3player.playTrack(1);
       
      }
      else if (entered[0] == '6' && entered[1] == '2' && entered[2] == '0' && entered[3] == '0' && entered[4] == '0')

      {
        
        Serial.println("Song2");
        
        MP3player.playTrack(2);
        MP3player.playTrack(2);
      }
      

      else
      {
        Serial.println("SongFail");
        
        MP3player.playTrack(3);
        MP3player.playTrack(3);
        
        }
    }
  }
}

Sorry abaout the messy code but maybe as you can tell by now Im not a very talented programmer. =)
Oh, and the reason I’ve used the MP3player.playTrack(..); twice is because it doesn’t seem to start the track with just one line. Maybe you know why?

This is the mp3-shield Im using. VS1053b