AudioUnitInputCallback clicking noise
AudioUnitInputCallback clicking noise
- Subject: AudioUnitInputCallback clicking noise
- From: Spencer Nielsen <email@hidden>
- Date: Thu, 4 Aug 2005 16:14:42 -0700
I am having a problem with an AudioUnit playing back my sound with a
light clicking noise(which is what it sounds like but it is really
probably the sound going dead for a split second). This AudioUnit is
a simple PCM output to the default output configured to consume data
provided by an AudioUnitInputCallback routine. This routine is
returning ready to be consumed data from a buffer at a constant size
(no time consuming conversion or other things going on in the
callback, just a few small memcpys and it returns). The AudioUnit
plays back the provided data just fine except for that little click
between every chunk of data that gets provided. I have played around
with the chunk size to verify that it is indeed not the source
audio. It always clicks between every data chunk.
One guess as to what is happening is that the AudioUnit only requests
more data when it is done playing what it has. During the time
between the end of the currently playing data and the next callback
provided data chunk, the output is silent for that split second. I
don't think that is correct because I would have thought that the
AudioUnit would have requested data a little sooner than the end of
the currently playing data so as to avoid this problem.
As far as I can tell this output AudioUnit gets a thread all to
itself to do its processing and call the input callback. So I
wouldn't think that the rest of my program is directly interfering.
Is there a setting I need to tweak? Can I manually provide the next
chunk of audio data in advance before the current chunk is done
playing? Is there some usage paradigm that I missed? Thanks for any
help or insights!
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