• 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
Signaling the end of audio conversion
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Signaling the end of audio conversion


  • Subject: Signaling the end of audio conversion
  • From: Stevo Brock <email@hidden>
  • Date: Tue, 14 Oct 2003 23:55:01 -0700

I've been using AudioConverterFillComplexBuffer for a while now and because of some bugs, just realized I have no idea exactly how to tell it I'm out of data. I've scoured the docs and sample apps and none of them seem to mention it or do it correctly. Here's the scenario...

My app calls AudioConverterFillComplexBuffer requesting, say, 1000 packets.

My fillBufferDataProc gets called asking for source packets. Let's say I'm at the end of the file and I only read 500 packets. I set ioNumberDataPackets and ioBufferList appropriately and return noErr. That's not enough source packets to supply the requested output packets, so AudioConverterFillComplexBuffer calls fillBufferDataProc again. Well there aren't any more source packets, so I...

A) set ioNumberDataPackets to 0, ioBufferList->...mDataByteSize to 0 and return noErr. Upon which fillBufferDataProc is called endlessly.

B) set ioNumberDataPackets to 0, ioBufferList->...mDataByteSize to 0 and return eofErr. At this point, AudioConverterFillComplexBuffer bails and returns eofErr. However, the ioBufferList and ioPacketCount haven't been touched.

Perhaps there's something I'm missing, but I just don't see how I'm supposed to flag the end of data in fillBufferDataProc.

Comments?

-Stevo Brock
Skyward Studios
_______________________________________________
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: Signaling the end of audio conversion
      • From: James McCartney <email@hidden>
  • Prev by Date: Re: AudioConverter fails on SRC when formats are float -> float
  • Next by Date: Re: Signaling the end of audio conversion
  • Previous by thread: Re: AudioConverter fails on SRC when formats are float -> float
  • Next by thread: Re: Signaling the end of audio conversion
  • Index(es):
    • Date
    • Thread