• 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
Re: missing frame in clipOutputSamples and convertInputSamples
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: missing frame in clipOutputSamples and convertInputSamples


  • Subject: Re: missing frame in clipOutputSamples and convertInputSamples
  • From: Jeff Moore <email@hidden>
  • Date: Fri, 29 Sep 2006 16:13:36 -0700

First, the HAL has no concept of that stuff. It's just writing data to an offset into the ring buffer that it is keeping track of totally independently of what's going on in the driver (well, except for the zero time stamp, of course). From time to time, depending on the circumstances, the HAL can skip over samples. The most common cause is an overload in the IO thread.

At any rate, I think your assumption isn't totally guaranteed to be true because of how the erase head works. Further complicating matters is the fact that when one client is playing and a second client starts playing, it is possible that the clip position can move backward relative to any previous call. This happens because the new client is putting data into the ring buffer into a position that has already been mixed/clipped once for the old client's data.

On Sep 29, 2006, at 3:55 PM, peoplestank wrote:

I am (still) working on a USB audio driver (dervied from the Apple USB Audio reference driver) and running into a problem where the value of firstSampleFrame to either convertInputSamples or clipOutputSamples in my audio engine is unexpected. The expectation the "next" call should set firstSampleFrame to (firstSampleFrame + numSampleFrames) of the previous call. Sometimes, however, firstSampleFrame is up 100 or so samples off.
Once this happens, my sample buffers and USB frame lists get out of alignment and the audio starts glitching.


How does CoreAudio compute firstSampleFrame before calling clipOutputSamples/convertInputSamples?


--

Jeff Moore
Core Audio
Apple


_______________________________________________ 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: 
 >missing frame in clipOutputSamples and convertInputSamples (From: peoplestank <email@hidden>)

  • Prev by Date: missing frame in clipOutputSamples and convertInputSamples
  • Next by Date: Re: Outputing to different Channels on a Device
  • Previous by thread: missing frame in clipOutputSamples and convertInputSamples
  • Index(es):
    • Date
    • Thread