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

Re: AudioConverter


  • Subject: Re: AudioConverter
  • From: Doug Wyatt <email@hidden>
  • Date: Mon, 18 Nov 2002 15:14:33 +0100

This is a FAQ ...

Sorry but you must use AudioConverterFillBuffer instead of AudioConverterConvertBuffer when there is a sample rate conversion. ConvertBuffer only works when the input size is not only known but constant. The kAudioConverterPropertyCalculateOutputBufferSize property returns an approximation, but the algorithm will consume slightly varying amounts...

Doug

On Monday, Nov 18, 2002, at 10:58 Europe/Berlin, Martin Hairer wrote:

Hi,

I think a similar issue has already been raised on this list, but I couldn't find
it and I'm not sure it was really resolved.

The problem I am running into is that of changing the sampling rate of a piece
of sound using an AudioConverter. When I use AudioConverterConvertBuffer
with a comfortable value for ioOutputDataSize, I always get a
kAudioConverterErr_InvalidInputSize error, which probably means that the
AudioConverter would like to fill up my output buffer completely but doesn't have
enough data in the input buffer. Why doesn't it simply fill up as much as possible
and writes the achieved size in the ioOutputDataSize variable?

In other words, is there a simple way to tell an AudioConverter to convert some buffer
of input data into a (big) output buffer and to tell me how many bytes were actually
written to the output buffer? I must have overlooked something obvious, since this sounds
to me like one of the main uses for an AudioConverter...

I've already tried to call kAudioConverterPropertyCalculateOutputBufferSize prior
to AudioConverterConvertBuffer, but it doesn't work either, since it seems to always
return some minimal (or maximal) size for the buffer, but not the precise size...

Thanks for any insight,

Martin
_______________________________________________
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.


--
Doug Wyatt
work: email@hidden (CoreAudio)
personal: email@hidden http://www.sonosphere.com
_______________________________________________
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: AudioConverter
      • From: Martin Hairer <email@hidden>
References: 
 >AudioConverter (From: Martin Hairer <email@hidden>)

  • Prev by Date: Re: It had to be tried...
  • Next by Date: Re: AudioConverter
  • Previous by thread: AudioConverter
  • Next by thread: Re: AudioConverter
  • Index(es):
    • Date
    • Thread