Re: AudioUnitInputCallback callback frequency
Re: AudioUnitInputCallback callback frequency
- Subject: Re: AudioUnitInputCallback callback frequency
- From: William Stewart <email@hidden>
- Date: Mon, 15 Aug 2005 16:04:00 -0700
I think there's a misunderstanding of what is going on here.
An input callback to an AU is called whenever an AU's Render API is
called. An AU will only get the input it needs at any particular time
to satisfy what it needs to satisfy this render call. In a case where
there is no sample rate conversion, this means that the AU if it is
asked for 512 samples, it will ask for input for 512 samples.
As the client of the AU, the AU calls our input callback, gives you a
buffer that is the correct size for the number of samples, tells you
that it wants that number of samples, and you provide it - no more,
no less.
The way that the output units work is that they are "attached" to the
I/O Proc of an Audio Device. When that I/O proc executes, it calls
the output unit's Render call for the number of samples for that I/O
Proc. So, your input callback gets called for the number of samples
needed for a given I/O proc. Unless you are doing too much work in
your IOProc and therefore causing an overload, you will next be
called for the next 512 samples and so on.
So - I would guess that your problem is either:
(1) You are overloading and causing a gap = you can install a
listener for device overloads (See PlaySequence in the SDK)
(2) You have a gap in the data you are feeding - you can't give the
callback more data than it asks for, just what it asks for
HTH
Bill
On 15/08/2005, at 3:11 PM, Spencer Nielsen wrote:
When using the default output AudioUnit and AudioUnitInputCallback
is there any way to make the input callback get called slightly
earlier than it normally does? I need it to because after I feed
it data it plays it correctly but does not call the callback to get
the next chunk early enough to prevent a period of time in which
there is no audio going out the default output. I need to be able
to have the output audio be unbroken. If I could make it pull the
next chunk of audio earlier that it does by default I believe I
would no longer have this problem. Thanks for any help!
Spencer Nielsen
_______________________________________________
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
--
mailto:email@hidden
tel: +1 408 974 4056
________________________________________________________________________
__
"Much human ingenuity has gone into finding the ultimate Before.
The current state of knowledge can be summarized thus:
In the beginning, there was nothing, which exploded" - Terry Pratchett
________________________________________________________________________
__
_______________________________________________
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