• 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
Fwd: Fwd: How does one update a view position during a core audio render callback?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Fwd: Fwd: How does one update a view position during a core audio render callback?


  • Subject: Fwd: Fwd: How does one update a view position during a core audio render callback?
  • From: "Dave O'Neill" <email@hidden>
  • Date: Sun, 08 Mar 2015 10:48:36 -0700


---------- Forwarded message ----------
From: Dave O'Neill <email@hidden>
Date: Sun, Mar 8, 2015 at 10:48 AM
Subject: Re: Fwd: How does one update a view position during a core audio render callback?
To: "Patrick J. Collins" <email@hidden>


Did you try running the example I made? https://gist.github.com/dave234/72bce8798dc7b1ade48b 
It's not meant to be a shining example of how to get a playhead position so much as it is to show a simple way of getting a value that is set from the render thread without potential blocking/obj-c messaging.  And to demonstrate that the timer works fine and doesn't slow down when added with NSRunLoopCommonModes. If you don't add your timer with timerWithTimeInterval instead of using scheduledtimerwithtimeinterval then adding it to a run loop will have no effect.

On Sun, Mar 8, 2015 at 10:36 AM, Patrick J. Collins <email@hidden> wrote:
> It looks like your timer might not be firing consistently.  I would test that first. I'm not sure
> what else is going on in your Application but if there is any tracking then a timer will be
> blocked. If your timer isn't firing as expected try adding it like this:
>     NSTimer *timer = [NSTimer timerWithTimeInterval:1.0 / 60.0 target:self
> selector:@selector(moveBox) userInfo:nil repeats:1];
>     [[NSRunLoop mainRunLoop]addTimer:timer forMode:NSRunLoopCommonModes];

Yeah unfortunately this didn't work either...  It seems that it fires
properly until audio starts playing, and then the timer callback
frequency goes down to the point that it only gets called 5 or 6 times
over a 1.6 second period...  Super weird.

Patrick J. Collins
http://collinatorstudios.com


 _______________________________________________
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

References: 
 >How does one update a view position during a core audio render callback? (From: "Patrick J. Collins" <email@hidden>)
 >Fwd: How does one update a view position during a core audio render callback? (From: "Dave O'Neill" <email@hidden>)
 >Re: Fwd: How does one update a view position during a core audio render callback? (From: "Patrick J. Collins" <email@hidden>)
 >Re: Fwd: How does one update a view position during a core audio render callback? (From: "Dave O'Neill" <email@hidden>)
 >Re: Fwd: How does one update a view position during a core audio render callback? (From: "Patrick J. Collins" <email@hidden>)

  • Prev by Date: Re: Fwd: How does one update a view position during a core audio render callback?
  • Next by Date: Fastest way to decode MP3 and AAC audio
  • Previous by thread: Re: Fwd: How does one update a view position during a core audio render callback?
  • Next by thread: Re: How does one update a view position during a core audio render callback?
  • Index(es):
    • Date
    • Thread