• 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: ExtAudioFileWrite, error -40 [resolved]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: ExtAudioFileWrite, error -40 [resolved]


  • Subject: Re: ExtAudioFileWrite, error -40 [resolved]
  • From: Anders Norlander <email@hidden>
  • Date: Tue, 16 Nov 2010 16:54:45 +0100

I found that the opposite situation also gives you an error, but slightly less confusing.
If you the number of frames to write is less than the maximum that would fit in the buffers
(as specified by mDataByteSize) you get a -50 (paramErr).

So I had to adjust the buffer sizes when writing the last frames to an audio file.
I suppose the error might actually come from AudioConverter services and not ExtAudioFile.
That was on OS X 10.6.4.

Seems a bit silly, since the buffer sizes are just a maximum size out which you may not use every byte.

-Anders

On 2010-11-15, at 23:17 , Edwards, Waverly wrote:

>
> I found the answer to my problem.  The framecount was more than the number of frames in the conversion buffer.  What I don't understand is why I was getting this error.  I had not change the disk writing code in a couple of months.  This code had been working even though my framecount was high.  Since I started receiving the -40 error, I realized the framecount was high for every file I tried to write, however, the file did write to disk in some instances but not others.
>
> status = ExtAudioFileWrite(outputFile, frameCount, &conversionBuffer);
>
> The easy answer is don't use a framecount that is too high for the buffer size but why this error message?  The error message I received is not intuitive or even make sense.
>
> Hopefully, this helps someone else in the future.
>

 _______________________________________________
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

References: 
 >ExtAudioFileWrite, error -40 (From: "Edwards, Waverly" <email@hidden>)
 >RE: ExtAudioFileWrite, error -40 [resolved] (From: "Edwards, Waverly" <email@hidden>)

  • Prev by Date: Core-MIDI Documentation
  • Next by Date: HostCallback_GetBeatAndTempo malfunction in Logic?
  • Previous by thread: RE: ExtAudioFileWrite, error -40 [resolved]
  • Next by thread: Re: Percussive attack on iPhone 4
  • Index(es):
    • Date
    • Thread