• 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: convert kAudioSessionProperty_CurrentHardwareOutputVolume to dB value
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: convert kAudioSessionProperty_CurrentHardwareOutputVolume to dB value


  • Subject: Re: convert kAudioSessionProperty_CurrentHardwareOutputVolume to dB value
  • From: Kevin Dixon <email@hidden>
  • Date: Tue, 17 Jul 2012 18:04:34 -0700

I have empirically tested an iPod Touch 4G to discover that the range
of this property (scaled to 1.0 = no attenuation) is a linear mapping
0 to -60dB.
Please see the chart here:
http://www.wasteonline.net/yano/papers/idevice_volume/ipod_touch_4g_chart.png

This model is also correct for the iPad 2... I haven't verified any
other devices yet

-Kevin

On Tue, Jul 17, 2012 at 2:40 PM, Kevin Dixon <email@hidden> wrote:
> Sorry -- more accurately, I was measuring *amplitude* of a 1kHz 0dB
> sine wave (integer PCM, peak values at +/-32767).
>
> When CurrentHardwareOutputVolume was reporting 1.0, I measured a
> steady signal with peak amplitude of -6dB on the headphone output of
> the device. I used this as a baseline.
>
> Using MPVolumeView, I adjusted CurrentHardwareOutputVolume to where it
> reported 0.711712 (if this were linear gain, this should indicate
> approximately -3dB attenuation). I then measured a steady signal,
> which the peak amplitude had decreased to -22dB.
>
> The difference between my measured amplitude at
> CurrentHardwareOutputVolume = 1.0 and CurrentHardwareOutputVolume =
> 0.711712 was 16dB.
>
> Most of this is irrelevant to the question at hand. How do I translate
> the value retrieved from CurrentHardwareOutputVolume to the actual
> attenuation the system is applying to the output of my RemoteIO unit?
>
> -Kevin
>
> On Tue, Jul 17, 2012 at 10:53 AM, Brian Willoughby <email@hidden> wrote:
>>
>> On Jul 16, 2012, at 17:08, Kevin Dixon wrote:
>>>
>>> So it seems that kAudioSessionProperty_CurrentHardwareOutputVolume
>>> returns arbitrary volume units instead of linear gain.
>>> For example when i get the value 0.711712, I convert to dB with
>>>
>>> 20.0f * log10(volume)
>>>
>>> returning ~ -2.95 dB.
>>>
>>> However when I measure a 0dB FS tone from my headphone output, with
>>> the volume at 0.711712, the observed power is more in the neighborhood
>>> of -16dB
>>
>>
>> -16 dB what?
>>
>> Decibels are relative, therefore, citing a -16 dB measurement is incredibly
>> vague when there is no reference value. Is that -16 dBm? -16dBV? -16 dBmV?
>>
>> With the volume at 1.000000 (0 dB), what power do you expect to measure?
>>
>> Also, don't forget that there are potentially other volume settings in the
>> path, and they must all be 0 dB if you want to measure one of them
>> accurately.
>>
>> Brian Willoughby
>> Sound Consulting
>>
>>
>>
>>> Can anyone clarify this situation? It is imperative that I know the
>>> actual attenuation so my algorithm can react correctly.
>>
>>
>>
 _______________________________________________
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: 
 >convert kAudioSessionProperty_CurrentHardwareOutputVolume to dB value (From: Kevin Dixon <email@hidden>)
 >Re: convert kAudioSessionProperty_CurrentHardwareOutputVolume to dB value (From: Brian Willoughby <email@hidden>)
 >Re: convert kAudioSessionProperty_CurrentHardwareOutputVolume to dB value (From: Kevin Dixon <email@hidden>)

  • Prev by Date: Re: convert kAudioSessionProperty_CurrentHardwareOutputVolume to dB value
  • Next by Date: Re: What's involved streaming audio to disk as mp3 in iOS
  • Previous by thread: Re: convert kAudioSessionProperty_CurrentHardwareOutputVolume to dB value
  • Next by thread: AU with CocoaView for 64-bit and CarbonView for 32-bit
  • Index(es):
    • Date
    • Thread