|[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]|
I have a few questions about the sample code:
Before each call to SCAudioFillBuffer the code does this:
for (i = 0; i < abl->mNumberBuffers; i++)
abl->mBuffers[i].mNumberChannels = (abl->mNumberBuffers > 1 ? 1 : asbd.mChannelsPerFrame);
abl->mBuffers[i].mDataByteSize = bufferSize;
abl->mBuffers[i].mData = ptr;
ptr = (UInt8*)ptr + bufferSize;
Can't this be taken out of the compression loop?
Yes, as used in scaudiocompress, this is actually one-time initialization code. It would, however, be necessary if the bufferSize were changing on every pull (e.g. if you were pulling for different amounts each time), so I left it in as "belt and suspenders" code.
_______________________________________________ Do not post admin requests to the list. They will be ignored. QuickTime-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.
Copyright © 2011 Apple Inc. All rights reserved.