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):
m_perf->MusicToReferenceTime( m_mmusicstart, &m_rmusicstart);
then I have on a loop to compute the time:
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?