[directmusic] ReferenceToMusicTime returns music time = 0

  • From: Abhijit Patait <abhijit_patait@xxxxxxxxx>
  • To: directmusic@xxxxxxxxxxxxx
  • Date: Wed, 14 Jul 2004 23:14:26 -0700 (PDT)

I am having problems calling the function 
IDirectMusicPerformance8::ReferenceToMusicTime(...) on a properly initialized 
performance interface. The music time returned is zero. Here is the code:
 
    // Assume that pPerf is the pointer to the IDirectMusicPerformance8 
interface
    pPerf->ReferenceToMusicTime(rt, &startTime);
I have verified that rt is valid when the above function is called.
 
Somewhere before calling this function, I am setting the performance's master 
tempo via the following call
 
    // Assume that ratio contains proper ratio for the desired tempo
    pPerf->SetGlobalParam(GUID_PerfMasterTempo, (void *) &ratio, 
sizeof(float))))
 
What could be wrong here? Does the performance object need to be initialized in 
any other way (other than InitAudio) before calling ReferenceToMusicTime(...)?
 
Thank you
Abhijit

                
---------------------------------
Do you Yahoo!?
Yahoo! Mail is new and improved - Check it out!


Other related posts: