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

Re: Error -40 from AudioFileWriteBytes or AudioFileWritePackets


  • Subject: Re: Error -40 from AudioFileWriteBytes or AudioFileWritePackets
  • From: Gregory Wieber <email@hidden>
  • Date: Tue, 02 Aug 2011 11:50:56 -0700

Another way to get the meaning of these errors is to open terminal and type: "macerror -40"



On Tue, Aug 2, 2011 at 11:48 AM, Doug Wyatt <email@hidden> wrote:
From MacErrors.h:

 posErr                        = -40,  /*tried to position to before start of file (r/w)*/


On Aug 2, 2011, at 7:56 , Steve gfx wrote:

> 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

 _______________________________________________
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: Steve gfx <email@hidden>
References: 
 >Error -40 from AudioFileWriteBytes or AudioFileWritePackets (From: Steve gfx <email@hidden>)
 >Re: Error -40 from AudioFileWriteBytes or AudioFileWritePackets (From: Doug Wyatt <email@hidden>)

  • Prev by Date: Re: Error -40 from AudioFileWriteBytes or AudioFileWritePackets
  • Next by Date: Building AudioUnits for Mac OS 10.5
  • Previous by thread: Re: Error -40 from AudioFileWriteBytes or AudioFileWritePackets
  • Next by thread: Re: Error -40 from AudioFileWriteBytes or AudioFileWritePackets
  • Index(es):
    • Date
    • Thread