I've had a look at your problem and I once had the same problem with media_play so I gave snd_play a try which worked perfectly for me. I guess media_play is better to show a video and stuff like that. Fading out music with media_play isn't the best option I guess so you better try snd_play.
Here's the code I tried using snd_play:
Code:
sound test = <yourmusic.file>;
var_nsave music_handle; // handle a given sound
var testsound; // test variable
var tempvolume; // volume
function sound_fade_out()
{
if(snd_playing(music_handle)==0)
{
tempvolume = 100; // the starting volume
music_handle = snd_play(test,tempvolume,0); // handle the music file with a given volume
while(testsound <= 100) // test instruction, change this to your needs which I guess was when a sertain inventory shows up.
{
snd_tune(music_handle,tempvolume,0,0); // define a new volume relative to tempvolume
wait(1);
tempvolume - = 0.5 * time_step; // fade out here, change '0.5' to suit your needs
}
}
}
Hope that helps you out

Btw, you can change snd_play to snd_loop if you need to have a sertain music file played over and over.
Cheers
Frazzle