• 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: Two AUHALs, one ring buffer, and one AU filter. But no sound.
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Two AUHALs, one ring buffer, and one AU filter. But no sound.


  • Subject: Re: Two AUHALs, one ring buffer, and one AU filter. But no sound.
  • From: Jeff Moore <email@hidden>
  • Date: Thu, 1 Jul 2004 16:42:16 -0700

The reason you will get glitches is precisely what Robert said "The syncing issue is that the two devices may be running at slightly different actual sample rates". In other words, the differences between the clocks of the two devices will eventually cause the output device to be far enough ahead or behind of the input device that a sample gets dropped (ahead) or a sample needs to be added (behind). This will manifest as a little hiccup or glitch when you listen to the output.

In order to keep this from happening, you need to resample one device's data to match the rate scalar of the other device.

On Jul 1, 2004, at 4:19 PM, john wrote:

Hi Chilton,

What Robert suggested is good. Though I'm not sure why he says you'll eventually get audio glitches (can you answer Robert?).

I use a similar method - using MTCoreAudio's MTByteBuffer I grab data from the input proc, do stuff with it, then when the AudioUnit output calls back I just return to it the amount of data it wants. I never have any audio glitches (at least that I notice).

-- John


Hi Chilton,

What you're trying to do is not impossible. You can pass the audio from the input device (the iMic) through your buffer to the output device. The syncing issue is that the two devices may be running at slightly different actual sample rates - even though they're both set to 44.1 kHz (for example) - meaning that you're eventually going to get subtle audio glitches.

It sounds like you need to build things bit by bit:
Get input working with your render proc
Then start putting it in the ring buffer.
Then start pulling from the buffer using the render callback from your Output Unit.
Then insert your filter.

Trying to do it all in one go seems to be adding confusion...?

Best,

Robert.
_______________________________________________
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.



--

Jeff Moore
Core Audio
Apple
_______________________________________________
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.


References: 
 >Two AUHALs, one ring buffer, and one AU filter. But no sound. (From: Chilton Webb <email@hidden>)
 >Re: Two AUHALs, one ring buffer, and one AU filter. But no sound. (From: Robert Grant <email@hidden>)
 >Re: Two AUHALs, one ring buffer, and one AU filter. But no sound. (From: john <email@hidden>)

  • Prev by Date: Re: Two AUHALs, one ring buffer, and one AU filter. But no sound.
  • Next by Date: Re: Two AUHALs, one ring buffer, and one AU filter. But no sound.
  • Previous by thread: Re: Two AUHALs, one ring buffer, and one AU filter. But no sound.
  • Next by thread: AUCarbonViewBase without controls?
  • Index(es):
    • Date
    • Thread