Re: Slider values on an Input Volume(Gain) Control
Re: Slider values on an Input Volume(Gain) Control
- Subject: Re: Slider values on an Input Volume(Gain) Control
- From: Jeff Moore <email@hidden>
- Date: Mon, 12 May 2003 17:24:57 -0700
The HAL applies the curve you observed to all IOAudioLevelControls
whose dB range is over 30dB.
On Monday, May 12, 2003, at 04:17 PM, Robert Penland wrote:
I'm having a little problem with the values that get sent to the gain
control of my AudioInput driver. If I create the control with the
following
line
myGainControl = IOAudioLevelControl::CreateVolumeControl(myCurrent,
myMin, myMax, 0,(18 <<16),
kIOAudioControlChannelIDAll,kIOAudioControlChannelNameAll,0,kIOAudioCon
trolU
sageInput);
I get a nice linear mapping from myMin to my Max when the gain control
slider in the audio preferences pane as the slider is moved from min
to max.
Since, my input hardware can also attenuate the input signal I thought
I
could modify the call as follows:
myGainControl = IOAudioLevelControl::CreateVolumeControl(myCurrent,
myMin, myMax, (-18 << 16),(18<<16),
kIOAudioControlChannelIDAll,kIOAudioControlChannelNameAll,0,kIOAudioCon
trolU
sageInput);
and still get a linear mapping from myMin to myMax, and whoever cared
in the
system would know that the input was also getting attenuated. If I do
this
however, the mapping of slider values from the audio preferences pane
gain
slider is no longer linear to my hardware. It almost looks like it is
some
sort of logrithmic relationship with the lower half more heavily
weighted
than the upper half. Can someone explain why this happens with a
negative
value for the min dB setting ?
Thanks,
Rob
_______________________________________________
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.
--
Jeff Moore
Core Audio
Apple
_______________________________________________
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.