Archived

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

DirectMusic

This topic is 6620 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Not sure if you can exactly get that, but...

I see you can get the length of the segment (IDirectMusicPerformance::GetLength). You know what reference time you started it at (when you called IDirectMusicPerformance::Play). Given these two, you should be able to calculate when it will end.

GetLength will return MUSIC_TIME, so if you did not use MUSIC_TIME when you started, you might have to convert MUSIC_TIME to REFERENCE_TIME (IDirectMusicPerformance::MusicToReferenceTime).

You could also get a notification when it's done and almost done (see DMUS_NOTIFICATION_SEGALMOSTEND and DMUS_NOTIFICATION_SEGEND).

I have not tried this all out, but it should work. Cool to see someone else actually trying out DirectMusic!

Good luck,

------------------

-Kentamanos

Share this post


Link to post
Share on other sites
How would one go about finding out the remaining time in seconds of a playing midi file/segment.

Jeremy

Share this post


Link to post
Share on other sites