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

Re: AudioConverterConvertBuffer sample?


  • Subject: Re: AudioConverterConvertBuffer sample?
  • From: Ken Wieschhoff <email@hidden>
  • Date: Tue, 5 Mar 2002 08:55:36 -0500

At 8:06 PM -0800 3/4/02, Doug Wyatt wrote:
On Monday, March 4, 2002, at 03:24 , Ken Wieschhoff wrote:
// Get the description from the default input unit
mStreamInDesc = GetAudioParameters();

mStreamOutDesc.mSampleRate = 44.100;

I assume you mean 44100 --

Whoops, my bad. 44100.0.



Admittedly AudioConverterConvertBuffer has no documentation, which is doubly bad because *I* can't say for sure how it's supposed to handle "unusual" conditions without some thought. But, that said, the conditions under which it should work are when ioOutputDataSize, on entry, is exactly the number of output bytes generated from inputBufferSize.


FWIW, when I saw the parameter passed by address, I assumed it was a maximum size so I was erring on the side of caution. Having updated my parameters to convert from 32-bit samples to 16-bit samples and passing a buffer size one half of the input size AudioConverterConvertBuffer now returns noErr.

->Ken


--
- --
Ken Wieschhoff
(770)813-0231
***************************
_______________________________________________
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:
    • Built-in audio controller - kAudioHardwareIllegalOperationError
      • From: Andreas Doerr <email@hidden>
References: 
 >Re: AudioConverterConvertBuffer sample? (From: Doug Wyatt <email@hidden>)

  • Prev by Date: MIDI and Sleep
  • Next by Date: Built-in audio controller - kAudioHardwareIllegalOperationError
  • Previous by thread: Re: AudioConverterConvertBuffer sample?
  • Next by thread: Built-in audio controller - kAudioHardwareIllegalOperationError
  • Index(es):
    • Date
    • Thread