Re: iPad Pro USB audio
Re: iPad Pro USB audio
- Subject: Re: iPad Pro USB audio
- From: Gordon Rankin <email@hidden>
- Date: Mon, 18 Mar 2019 15:25:19 -0400
- Organization: Wavelength Audio, ltd.
- X_cmae_category: , ,
- X_cmae_category: , ,
Brian,
It is probably the default volume setting on the input. Since the OS
requires the following info for USB Audio Class volume:
a) Minimum volume
b) Maximum volume
c) Step size of volume
d) Current or Default setting
In all cases that I have seen on IOS and macOS the HOST will ask for
these variables and then set the either the Current Setting or the last
setting to the device.
I would bet in this instance the Current Setting or Default Setting is
probably -29dB.
Jean-Charles, you can test this quickly on a macOS computer by plugging
that device in and then using the Audio Midi Setup application found in
the Utilities folder and see what the settings are.
Thanks,
Gordon
On 3/18/19 3:00 PM, email@hidden wrote:
Message: 1
Date: Sun, 17 Mar 2019 14:22:45 -0700
From: Brian Willoughby<email@hidden>
To: Jean-Charles Rousset<email@hidden>
Cc: Andrew Smith<email@hidden>,email@hidden
Subject: Re: iPad Pro USB audio
Message-ID:<email@hidden>
Content-Type: text/plain; charset="utf-8"
Rather than divide by 28.18, you can multiply by 0.03548, which is (1 / 28.18).
This can be faster, depending upon the compiler.
What you’re doing is dropping the signal level by 29 dB. This tells me there is
a gain issue somewhere that you’re not aware of.
In my experience, input devices may or may not have a volume control associated
with the device in CoreAudio. Of those devices that have a volume control, the
range can vary wildly. Some hardware devices can only attenuate - they cannot
boost the gain - so their volume ranges from negative gain to 0 dB, but no
higher. Other hardware devices can handle significant gain, so their volume
control ranges from negative gain to positive gain, and sometimes that is as
high as +15 dB or +30 dB. On my MacBook Pro, the built-in microphone volume
ranges from -12 dB to +12 dB.
My point is that you can’t set the input device volume to maximum for all
devices. The +29 dB gain that you’re seeing is probably due to the volume
setting for the input device. This is exposed to the user, so there might not
be an Apple-approved way to guarantee that this isn’t set to something crazy.
If the control maxes out at 0 dB, then you want to turn it all the way up. If
the control goes beyond 0 dB, then it’s a really bad idea to set the control to
the top of the range.
I’ve never written code to access the hardware input device volume control, but
everything else in CoreAudio provides metadata for the units and range of a
control. Thus, you should be able to see that your input device is set to +29
dB instead of 0 dB, where it wouldn’t clip.
By the way, if you’re using an XMOS chip, then you might want to check whether
the firmware properly implements USB Audio Device Descriptors as appropriate
for your hardware. A mistake in the USB firmware could cause significant
problems with CoreAudio.
Brian Willoughby
--
J. Gordon Rankin
Owner and Chief Scientist
====== Wavelength Audio, ltd ======
_______________________________________________
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