edit: As luck would have it, I figured out the solution to the problem. The manual notes that .mid can't be altered, but it lead to me finding the master_vol variable which will affect midi volume.....nvmnd. frown [/edit]


So, I've had this problem ever since A6, and I've just downloaded lite-c (with A7 - free cuz I'm poor) and the problem is still there. I'm pretty sure this is user error, because this would be a rather noticeable bug, so maybe someone can show me where I'm going wrong.

The aim of my code is simple: play a midi file, and then fade that midi file out until it is completely quiet. The problem is, media_tune() or even the midi_vol variable aren't doing anything for me. I've also tried just using the generica "media_handle" handle to see if I can manipulate that and I can't. The song plays at full volume unphased, unless I use media_stop() to abruptly end it. In fact, I can't even start the song at a lower volume. What's the deal?! If I didn't know any better, I would say the functions are broken.

I've been trying to get back into programmiing, but there's nothing more frustrating then when I'm testing out the early features of my project and the simplest things aren't working...despite that I'm following the documentation word-for-word.

Thanks in advance for any help.

Code:

[code]
var volume = 100;

function main()
{
video_mode = 8;
video_screen = 1;
var hMedia = 0;
hMedia = media_loop("Dungeon01.mid", NULL, 100);
while (volume > 0)
{
volume -= 1;
media_tune(hMedia, volume, 0, 0);
wait (1);
}

}

Last edited by Irish_Farmer; 04/14/09 03:12.

"The task force finds that...the unborn child is a whole human being from the moment of fertilization, that all abortions terminate the life of a human being, and that the unborn child is a separate human patient under the care of modern medicine."