Members - Reputation: 122
Posted 02 December 1999 - 01:06 PM
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!