Archived

This topic is now archived and is closed to further replies.

Nacho

Getting the elapsed time from a midi segment

Recommended Posts

Hi! I´m giving the finishing touches to my simple game and I´m having some trouble with the audio part. I´m using DirectMusic 6.1 to play midi songs in the game´s menu and the game´s loop. Since the game unloads all the resources (surfaces, sound buffers, etc) when it switches from one state to another (for example: from the menu to the game loop), the music restarts from the beggining as well when the game returns to the previous state (the game loop to the menu). I´ve been thoroughly examining the DirectMusic documentation because I need to find a way to retrieve the elapsed time of a midi segment so, when I have to unload the segment due to a switch in the current state, I keep the elapsed time in a variable that will be used when the segment needs to be loaded and played again. Unfortunately, I haven´t been able to find a method to achieve that, can anybody of you help me? Thanks a lot! --Ignacio Liverotti iliverotti@hotmail.com

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
Why not just keep track of it yourself? You really won''t need much precision anyway..
And as for the obvious solution: don''t reload your resources in the first place.

Share this post


Link to post
Share on other sites
Thanks for replying!

quote:
Original post by Anonymous Poster
Why not just keep track of it yourself? You really won''t need much precision anyway..


Yeah, well, I thought about that. But how can I set the initial point of execution for a midi segment?

--Ignacio Liverotti
iliverotti@hotmail.com

Share this post


Link to post
Share on other sites