Mailing Lists: Apple Mailing Lists
Image of Mac OS face in stamp
Sound Recording
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Sound Recording



We setup AudioUnit for sound recording specifying the input callback
function with prototype of AURenderCallback.

Inside the callback we use AudioUnitRender with the same timestamp and
flags to render audio data. We need to render to a circular buffer
which has a head and tail index, consumed by another thread.

Currently we create a shadow buffer, render to it and then copy bytes
to the circular buffer by breaking up the data to wrap around as
necessary.

Ideally we want to render to the circular buffer directly to avoid
this extra copy.

I see 1 possible way:
When invoking AudioUnitRender inside the callback, specify
numberFrames which can be adjusted for size of remaining circular
buffer. (potentially less than numberFrames supplied with
AURenderCallback)
But with this approach when next time AURenderCallBack is invoked will
I get the data  immediately starting from where rendering finished
last time? Do I need to adjust timestamp for this? If so any pointers
how to do so?

I'll appreciate help in this regard.

Thanks,
Bankim.
 _______________________________________________
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



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2011 Apple Inc. All rights reserved.