• 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
Error -40 from AudioFileWriteBytes or AudioFileWritePackets
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Error -40 from AudioFileWriteBytes or AudioFileWritePackets


  • Subject: Error -40 from AudioFileWriteBytes or AudioFileWritePackets
  • From: Steve gfx <email@hidden>
  • Date: Tue, 02 Aug 2011 15:56:54 +0100

Hi,

I'm writing the contents of a buffer to a WAVE file using  AudioFileWriteBytes . (I can use AudioFileWritePackets also, but I get exactly the same behaviour)

The total number of bytes to write is about 400k which pre-exist, so need need to stream.

If I  set  ioNumberBytes to  8192 or less, and loop through all the bytes, all works well, but If I set it higher than this I get a -40 error , which I can't locate in the docs.

Although it works OK with these smaller chunks, obviously it's a little more inefficient as I have to loop through the buffer more times; I would prefer to write in as few chunks as possible, 1 preferably.

Is this just an inherent  limitation of those two functions?

Thanks

Steve _______________________________________________
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

  • Follow-Ups:
    • Re: Error -40 from AudioFileWriteBytes or AudioFileWritePackets
      • From: Doug Wyatt <email@hidden>
  • Prev by Date: audio buffer setup
  • Next by Date: AUGenericView relies on CoreAudio.component but doesn't load it
  • Previous by thread: audio buffer setup
  • Next by thread: Re: Error -40 from AudioFileWriteBytes or AudioFileWritePackets
  • Index(es):
    • Date
    • Thread