AudioConverters
AudioConverters
- Subject: AudioConverters
- From: Francois Hamel <email@hidden>
- Date: Thu, 29 Jul 2004 18:20:42 -0400
Why is it that when I call AudioConverterFillComplexBuffer with a
certain packet number, I don't get the same number in the variable
"ioNumberDataPackets" in my convertion callback? Then, just after the
call, the packet count returned is the same as the one when the
function was called.
ex:
uint32 readPacketCount = 0;
uint32 remainPacketCount = size / m_inFormat.mBytesPerPacket;
while( remainPacketCount > 0 )
{
readPacketCount = remainPacketCount;
//here readPacketCount can be something like 16000
//then in the callback "ConvertCallback" I receive 12000 as the
"ioNumberDataPackets" var
OSStatus result = AudioConverterFillComplexBuffer(m_converter,
&ConvertCallback, this, &readPacketCount, m_buffers, NULL);
//and here I receive 16000 back from the readPacketCount
variable
m_dwSrcDataOffset += readPacketCount *
m_inFormat.mBytesPerPacket;
remainPacketCount -= readPacketCount;
}
what could be causing this? Is it possible also to convert a big buffer
in one pass (without a loop)?
Frank
_______________________________________________
coreaudio-api mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/coreaudio-api
Do not post admin requests to the list. They will be ignored.