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

Re: Clip-level question


  • Subject: Re: Clip-level question
  • From: Jeff Moore <email@hidden>
  • Date: Tue, 3 Jun 2008 18:21:42 -0700

Just so we're clear on terminology, the valid range for a floating point sample is not [-1.0, +1.0] as you seem to be saying but rather the range [-1.0, +1.0). The fact that +1.0 is a clipped value often trips folks up with floating point samples.

On Jun 3, 2008, at 3:41 PM, Glenn Zelniker wrote:

Sorry if this has been asked before, but I can't seem to find a satisfactory answer.
I am trying to determine the level at which a sine wave will produce audible clipping.

First off, this is going to depend very highly on what audio device you are using. It also depends highly on where you are setting the volume slider and what the range of that volume slider is.


To wit, I am playing a sine wave (1 kHz @ -1 dBFS) from disk using a small test program I wrote. I convert these samples to floats and apply gain before sending the samples off to the output. I've found that depending on the position of the system volume-control, the amount of gain I can apply varies before clipping occurs. This would seem to indicate that the system volume-control is operating pre- DAC, no?

It seems to me that a more obvious answer is that it depends on what the hardware volume control is set to, whether the device in question is doing any sort of defensive DSP, etc.


But I've yet to find any kind of calibration information that explains the peak level that a sine wave can achieve without resulting in clipping, as a function of the position of the system volume-control.

That's because we don't provide anything like that. There are two many variables in the equation to nail that down with any sort of accuracy for the general case. I can't even remember if the hardware tech notes even include the line voltages the DACs put out.


With the system volume set to maximum, it appears that I can send out values larger than 30 dB above what I would have thought was full scale (relative to +/- 1.0 floats).

Again, depending on what device you are using, you could see variations like this. In fact if the device is doing defensive DSP (like with the built-in speaker on our hardware), you'll also see variations that depend on the frequency of the signal.


So, can anyone tell me what the peak sine clip level is as a function of the system volume control?

At a very fundamental level, this question is basically unanswerable in the general case. At the very least, the variations in the resistors, caps, and other bits of hardware in the audio device are going to make such results meaningful only for a single combination of CPU and audio device and then only if you actually go and measure it electrically.



--

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: 
 >Clip-level question (From: Glenn Zelniker <email@hidden>)

  • Prev by Date: Re: Clip-level question
  • Next by Date: Re: AUTimePitch and AUGraph
  • Previous by thread: Re: Clip-level question
  • Next by thread: Gearing up for WWDC
  • Index(es):
    • Date
    • Thread