Jump to content

  • Log In with Google      Sign In   
  • Create Account

Time In DirectMusic (DX7)


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
No replies to this topic

#1 fungame   Members   -  Reputation: 122

Like
Likes
Like

Posted 21 February 2000 - 09:00 AM

Hello all. I am doing some experimentation with DirectMusic, and writing a midi player. I am attempting to keep track of the time passed playing a segment... this is the code I have. When the segment is started (called only once): REFERENCE_TIME m_rmusicstart; MUSIC_TIME m_mmusicstart; ... m_segmentstate->GetStartTime(&m_mmusicstart); m_perf->MusicToReferenceTime( m_mmusicstart, &m_rmusicstart); then I have on a loop to compute the time: REFERENCE_TIME m_prtNow; MUSIC_TIME m_pmtNow; m_perf->GetTime(&m_prtNow, &m_pmtNow); m_prtNow =- m_rmusicstart; m_pmtNow =- m_mmusicstart; Then I would do my conversion into HH:MM:SS (Hours minutes and seconds). All that is suposed to work nicely (and in the MIDI Player sample from the DX7 SDK, it does,) but in my sample, as the values from GetTime() get larger, m_rmusicstart and m_rmusicstart get equally smaller, making the time elapsed always appear to be 0. Im not sure why any of this happens, because my code never modifies m_rmusicstart or m_mmusicstart after GetStartTime() is called for the segment. Any ideas, or other methods to keep track of time? Fungame

Sponsor:



Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS