• 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 gives non normalized samples?!
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: AudioConverter gives non normalized samples?!


  • Subject: Re: AudioConverter gives non normalized samples?!
  • From: Jeff Moore <email@hidden>
  • Date: Tue, 27 Jan 2009 11:56:48 -0800

Yes. The float-to-int converters all use saturation instructions during the conversion.

BTW, if you have out-of-range samples in the raw recording, after analog-to-digital conversion, it is generally too late to do anything about it. You need to watch your headroom on the signal feeding into the ADC and keep it from clipping before it gets into the computer. That's the only way to get a clean signal.

On Jan 27, 2009, at 9:55 AM, Mike Kluev wrote:

On Tue, 27 Jan 2009 09:33:15 Jeff Moore wrote:

I would add that the main reason we use floating point samples is precisely this situation. Generally, the only time you need to clip your sample buffers is if you are going to convert them to another sample format. Otherwise, just let the out-of-range samples ride. More often than not, they come back into range later after more processing has been applied. And even if they don't, you still don't need to clip the samples yourself as the driver will take care of that for you in the final mixing stage when it is converting the floating point samples into the hardware's native format.

Does AudioConverter correctly clips overflown samples when it converts from floats to shorts? I do some mic recording + postprocessing, putting the result into PCM file (samples are shorts) and noticed that the wave form is not "nice" due to overflow on the said out-of-bounds samples. If I manually clip sample values to the -1 .. +1 range the wave form is ok.



--

Jeff Moore
Core Audio
Apple


_______________________________________________ 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: 
 >AudioConverter gives non normalized samples?! (From: "Mike Kluev" <email@hidden>)
 >Re: AudioConverter gives non normalized samples?! (From: "Mike Kluev" <email@hidden>)

  • Prev by Date: Re: Determining Pitch from Microphone
  • Next by Date: Re: ExtAudioFileRead and AudioBufferList, should I use something else?
  • Previous by thread: Re: AudioConverter gives non normalized samples?!
  • Next by thread: Re: AudioConverter gives non normalized samples?!
  • Index(es):
    • Date
    • Thread