• 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: Using AudioConverter
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Using AudioConverter


  • Subject: Re: Using AudioConverter
  • From: Doug Wyatt <email@hidden>
  • Date: Sun, 17 Oct 2004 13:41:47 -0700

On Oct 16, 2004, at 6:06, Patrick Machielse wrote:
    //
    //  convert the buffer (fails with error -50)
    //
    UInt32 outSize = 0;
    err = AudioConverterConvertBuffer(conv,
                                      inBufSize,
                                      (void*)inBuf,
                                      &outSize,
                                      (void*)outBuf);

-50 is paramErr, a standard MacOS error code, indicating that a function was passed an invalid parameter value. The fourth parameter is "ioOutputDataSize". The "io" prefix indicates that the value is significant both on entry and exit from the function. On entry it is the size of the output buffer in bytes. On exit it is the number of bytes written into the output buffer. AudioConverterConvertBuffer is returning paramErr because *ioOutputDataSize is 0 on entry. Change it to be the real size of the buffer in bytes.


hth,
Doug

_______________________________________________
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: Using AudioConverter
      • From: Patrick Machielse <email@hidden>
References: 
 >Using AudioConverter (From: Patrick Machielse <email@hidden>)

  • Prev by Date: Using AudioConverter
  • Next by Date: AuBase::GetLatency()
  • Previous by thread: Using AudioConverter
  • Next by thread: Re: Using AudioConverter
  • Index(es):
    • Date
    • Thread