It would be simpler, IMO, to put all the IR codes that correspond to tracks in an array like this:
// ir codes for tracks
unsigned int trackCodes[] = {41565, 25245, 57885};
// record # of tracks
int numTrackCodes = sizeof(trackCodes) / sizeof(trackCodes[0]);
Then your switch statement could be turned upside down to handle the "special" keys first and if one of those has not been clicked look at the codes for each track. If one of those keys has been clicked use the IR code index in the array to play the proper track.
void loop() {
if (receiver.decode(&output)) {
unsigned int value = output.value;
switch (value) {
//turn LED on or off
case holo_key:
if (led[1] == 1) {
digitalWrite(holo_pin, LOW);
led[1] = 0;
} else {
digitalWrite(holo_pin, HIGH);
led[1] = 1;
}
break;
//play random sound
case audio_random:
myPlayer.playFileAndWait(random(1, 9), 10);
break;
//play random sound in loop with delay
case audio_random_loop:
myPlayer.playFileAndWait(random(1, 9), 10);
delay (random(1200, 3000));
break;
default:
int idx;
// find index based on ir code
for (idx = 0; idx < numTrackCodes; idx++) if ( trackCodes[idx] == value ) break;
//play specific sound
if ( idx < numTrackCodes ) myPlayer.playFileAndWait(idx+1, 10);
break;
}
Serial.println(value);
receiver.resume();
}
}