You have to use this in a while-loop.

You have to save the handle of the media_play instruction
(mhandle=media_play(...);
then use a variable for the volume and lower them every loop a little bit
(volume-=2*time_step;).
Than you use media_tune each loop and "manipulate" the volume of the playing sound.
(media_tune(mhandle,...);


Regards
TSGames