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

AudioConverter sample rate conversion


  • Subject: AudioConverter sample rate conversion
  • From: email@hidden
  • Date: Thu, 29 May 2003 15:17:05 -0400 (EDT)

I am writing a little app to playthrough sound from an input to an output;
though they are both 44.1khz, the actual speed can fluctuate a bit so I am
trying to use sample rate conversion to keep from overrunning or
underrunning my buffer.

I am trying to us the AudioConverterFillBuffer function to do this
conversion, and its working great. It seems like the only way to change
the sample rate is to create a new AudioConverter, so to prevent hiccups I
want to use "kConverterPrimeMethod_Pre" to prime the new converter with
data before it starts working, however I can't figure out how much extra
data its reading the first time.

I'm using AudioConverterGetProperty of kAudioConverterPrimeInfo to get
leading/trailing sizes, but they read as 48 and I'm seeing the converter
ask for a lot more than 48*2 extra on its first read (more like 1000). If
I try to set the kAudioConverterPrimeInfo values, i get an error. Am I
going about this the wrong way?

Here's how I'm trying to get the leading/trailing frames:

PrimeInfo primeInfo;
err = AudioConverterGetProperty(tempAudioConverterRef,
kAudioConverterPrimeInfo,
sizeof(&primeInfo),
&primeInfo);

Thanks for any info!

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

  • Prev by Date: Re: Conclusion: Can anyone comment on Crashes in AUParameterSet?
  • Next by Date: Re: Update Cocoa object from callback
  • Previous by thread: porting real-time audio capture to OSX
  • Next by thread: CoreMIDI and Carbon
  • Index(es):
    • Date
    • Thread