Re: iSight and ComplexPlayThru
Re: iSight and ComplexPlayThru
- Subject: Re: iSight and ComplexPlayThru
- From: Michael Thornburgh <email@hidden>
- Date: Sat, 12 Feb 2005 11:13:13 -0800
the iSight uses variable buffer sizes. take a look at
kAudioDevicePropertyUsesVariableBufferFrameSizes. i always use the
this value, if available, for sizing buffers, and just make sure the
right thing will happen if fewer frames are desired/provided.
-mike
On Feb 12, 2005, at 5:54 AM, Taco Kampstra wrote:
Hello,
I ran into a problem using the iSight device as input for the AUHAL,
it seems to occur in the ComplexPlayThru sample as well.
When one asks the buffersize as in:
UInt32 propertySize = sizeof(bufferSizeFrames);
err = AudioUnitGetProperty(mInputUnit,
kAudioDevicePropertyBufferFrameSize, kAudioUnitScope_Global, 0,
&bufferSizeFrames, &propertySize);
bufferSizeBytes = bufferSizeFrames * sizeof(Float32);
it returns a bufferSizeFrames of 768, the input buffer sizes are
allocated using this value.
However, the ComplexPlayThru::InputProc then asks for 800 input
frames, this is passed through to:
err= AudioUnitRender(This->mInputUnit,
ioActionFlags,
inTimeStamp,
inBusNumber,
inNumberFrames, //# of frames requested
This->mInputBuffer);// Audio Buffer List to hold data
thereby overwriting the mInputBuffer.
Am I missing something ?
thanks,
Taco Kampstra
_______________________________________________
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