• 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: Synchronization problem in 10.2
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Synchronization problem in 10.2


  • Subject: Re: Synchronization problem in 10.2
  • From: Mark Cookson <email@hidden>
  • Date: Thu, 3 Oct 2002 14:23:48 -0700

On Thursday, October 3, 2002, at 12:24 AM, Michel wrote:

On Thursday 03 October 2002 07:55, Laurent Humbert wrote:
!!! firstSampleFrame->audioEngine->numSampleFramesPerBuffer (XXXXX >
YYYYY)

I wish I hadn't lost so much time trying to figure that one out.
Eventually DTS put an end to my misery.

OMG! I had exactly the same problem when I attempted to use a buffer of 512
samples. And now even with 1024, I still have that if I have multiple apps
playing sound on the device at the same time.
I had timed very carefully my interupts, and they were easily within 0.01
microseconds, but it was impossible to get the engine working with that size.
I will try with your 'cheat sheet' and see what happend.

It's a bit sad that the only way of fixing it is to just effectively cancel
the renowed super-duper algorythm that makes IOAudioEngine sooooo special ;-)

Did you also have bad mixed noise? like, perfect sound if only one HAL client
is playing, but bad quality (like if the sound is not mixed, but replaces the
samples in the mix buffer) if 2+ are playing?

When you say a buffer of 512 samples or 1024 samples, which buffer are you referring to? The buffer you registered with setSampleBuffer, or your hardware's internal buffer (which I would think would be fixed), or your DMA transfer buffer size, or something else?

You almost certainly need a buffer given to setSampleBuffer larger than 512 samples because most HAL clients use a buffer of that size, which means that there is no room for the erase head or your DMA hardware to read from. I'm sure the HAL would force a smaller buffer size on the clients, but I doubt that they really want to be working in buffers of 128 samples or less.

IOAudioFamily is responsible for mixing the incoming streams of audio from each instance of the HAL. In my experience it is quite reliable in doing that. Are you overriding any of the more obscure IOAudioEngine or IOAudioStream functions? Like the ones dealing with the erase head or mixer? I can't think of a reason why two clients wouldn't work as well as one client.

--
Mark Cookson
Engineering Droid
Apple Computer, Inc.
Core Audio CPU Software
6 Infinite Loop MS 306-2CW
Cupertino, CA 95014
_______________________________________________
coreaudio-api mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/coreaudio-api
Do not post admin requests to the list. They will be ignored.

  • Follow-Ups:
    • Re: Synchronization problem in 10.2
      • From: Michel <email@hidden>
References: 
 >Re: Synchronization problem in 10.2 (From: Michel <email@hidden>)

  • Prev by Date: Re: Synchronization problem in 10.2
  • Next by Date: Re: AUPresets in Logic
  • Previous by thread: Re: Synchronization problem in 10.2
  • Next by thread: Re: Synchronization problem in 10.2
  • Index(es):
    • Date
    • Thread