• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
AudioConverters
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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.


  • Follow-Ups:
    • Re: AudioConverters
      • From: Doug Wyatt <email@hidden>
  • Prev by Date: Re: coreaudio-api digest, Vol 2 #1286 - 2 msgs
  • Next by Date: Getting Device Information
  • Previous by thread: Re: coreaudio-api digest, Vol 2 #1286 - 2 msgs
  • Next by thread: Re: AudioConverters
  • Index(es):
    • Date
    • Thread