Re: Acquiring input Data
Re: Acquiring input Data
- Subject: Re: Acquiring input Data
- From: Paul Barbot <email@hidden>
- Date: Fri, 17 Jun 2005 11:24:41 +0200
On 6/17/05, Heath Raftery <email@hidden> wrote:
> Your main function looks fine to me. Can you show us your input
> callback, where AURender is called? My guess is that the
> AudioBufferList you are providing to the Render call is not right. I
> believe it needs to be ready to accept data of the type specified by
> your InputUnit.
Yes, I think it's can be the AudiobufferList because i didn't know how to
allocate it (just like you say in another thread)
here how i try to allocate in my my main() :
/*-----------------------------main------------------------------------*/
theBufferList.mNumberBuffers = 1;
theBufferList.mBuffers[0].mDataByteSize = 100;
theBufferList.mBuffers[0].mData = calloc(100,1);
theBufferList.mBuffers[0].mNumberChannels = 1;
/*-----------------------------main------------------------------------*/
I have declared it into a global variable (it not very clean but it's
just for the test)
so its reachable in the callback.
/*----------------------------callback------------------------------------*/
OSStatus InputProc ( void *inRefCon,
AudioUnitRenderActionFlags *ioActionFlags,
const AudioTimeStamp *inTimeStamp,
UInt32 inBusNumber,
UInt32 inNumberFrames,
AudioBufferList * ioData)
{
OSStatus err = noErr;
err = AudioUnitRender(InputUnit,
ioActionFlags,
inTimeStamp,
inBusNumber, //will be '1' for input data
inNumberFrames, //# of frames requested
&theBufferList);
return err;
}
/*----------------------------callback----------------------------------------------------/*
thank for your response !
--
Paul Barbot
_______________________________________________
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