Re: Setting buffer size / latency of DefaultOutputUnit ?
Re: Setting buffer size / latency of DefaultOutputUnit ?
- Subject: Re: Setting buffer size / latency of DefaultOutputUnit ?
- From: William Stewart <email@hidden>
- Date: Fri, 6 Aug 2010 18:12:23 -0700
On Aug 4, 2010, at 11:39 PM, Mattiello Joseph wrote:
> I'm working on an application that sends decoded PCM audio to the DefaultOutputAudioUnit. It's written in C# using Mono and I've wrapped the important parts of CoreAudio.
> There is a problem in that the output unit polls for data in very small pieces and expects them very quickly. Whenever the system is under stress such as when the garbage collector is running we can't guarantee that we can return from our rendering callback in the several ms required before a gap in playback occurs. In our Linux/Windows implementations this isn't a problem because we can specify a larger latency/buffer size giving us much more execution time per callback.
Yes, because you are one stepped removed from the low-level I/O requirements of the audio system. Using an audio unit, you are NOT that removed. If you want to be more removed from this requirement then you either:
(1) create your own buffer so that you write into this buffer far enough ahead that you do not get under=runs when the output unit reads from it
(2) use the audio queue API
- it is a higher level API and puts you further away from the real-time requirements of audio I/O. You can use a larger buffer, etc..
>
> The basic question is, is it possible to increase the requesting buffer size (at the course of latency of course) of the DefaultOuputAudioUnit ?
Only to a limited amount, but I don't think that will be sufficient for your needs
Bill
>
> Thanks for your time.
> -Joe
>
>
>
> _______________________________________________
> 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
_______________________________________________
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