Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8135843
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T10:32:59+00:00 2026-06-06T10:32:59+00:00

I am trying to synchronize several CABasicAnimations with AVAudioPlayer . The issue I have

  • 0

I am trying to synchronize several CABasicAnimations with AVAudioPlayer. The issue I have is that CABasicAnimation uses CACurrentMediaTime() as a reference point when scheduling animations while AVAudioPlayer uses deviceCurrentTime. Also for the animations, CFTimeInterval is used, while for sound it’s NSTimeInterval (not sure if they’re “toll free bridged” like other CF and NS types). I’m finding that the reference points are different as well.

Is there a way to ensure that the sounds and animations use the same reference point?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-06T10:33:01+00:00Added an answer on June 6, 2026 at 10:33 am

    I don’t know the “official” answer, but they are both double precision floating point numbers that measure a number of seconds from some reference time.

    From the docs, it sounds like deviceCurrentTime is linked to the current audio session:

    The time value, in seconds, of the audio output device. (read-only)

    @property(readonly) NSTimeInterval deviceCurrentTime Discussion The
    value of this property increases monotonically while an audio player
    is playing or paused.

    If more than one audio player is connected to the audio output device,
    device time continues incrementing as long as at least one of the
    players is playing or paused.

    If the audio output device has no connected audio players that are
    either playing or paused, device time reverts to 0.

    You should be able to start an audio output session, call CACurrentMediaTime() then get the deviceCurrentTime of your audio session in 2 sequential statements, then calculate an offset constant to convert between them. That offset would be accurate within a few nanoseconds.
    The offset would only be valid while the audio output session is active. You’d have to recalculate it each time you remove all audio players from the audio session.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Trying to make this jQuery filter that uses .find case-insensitive. For example, when the
I have two QTableWidgets and I'm trying to synchronize them as an exercise to
I have a simple console application that runs calculations in several threads (10-20 of
I am trying to synchronize my own database for tracks and albums (that contains
I have a desktop (winforms) application that uses a Firebird database as a data
I'm trying to synchronize a visualizer with an audio-track that's being played with the
I am trying to add event that can synchronize with the mail account. I
Trying to implement a timer for my game that I'm making. I have a
I have three firewire cameras which can automatically synchronize via hardware and I'm trying
Hi all! I'm trying to synchronize two databases, one local and one remote. The

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.