• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
CAClock convert beats to secs
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

CAClock convert beats to secs


  • Subject: CAClock convert beats to secs
  • From: Tamas Nagy <email@hidden>
  • Date: Fri, 06 Sep 2013 15:08:27 +0200

Hi,

I'm trying to get the current time of a CAClock in seconds. Seems to 

CAClockGetCurrentTime(theClock, kCAClockTimeFormat_Seconds, &currentTime);

always returns the absolute time of the clock, which is not I want. I want to convert the actual barbeattime to seconds instead. So, I'm getting the beats time this way: 

CAClockGetCurrentTime(theClock, kCAClockTimeFormat_Beats, &currentTime);
_seconds = currentTime.time.seconds;

This is cool, but seems the _seconds variable always twice as large then it should. 4 beats at 120 BPM should take 2 seconds, but _seconds variable is 1 second.

Is this an issue, or I missed something?

Thanks,

Tamas
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Coreaudio-api mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Prev by Date: Re: Different sample types between Simulator and device
  • Next by Date: logic overrides drop down menu and text entry styles
  • Previous by thread: RE: AudioHardwarePlugIn vs AudioServerPlugIn
  • Next by thread: logic overrides drop down menu and text entry styles
  • Index(es):
    • Date
    • Thread