Here is a strange interaction that I discovered on one particular
brand of Android Tablet.  This interaction can cause the audio sample
rate to change by 9% under certain condition.  Those conditions are:

1. The HDMI video output to a TV monitor is connected.

2. The Touch Sounds are enabled in Settings / Sounds.  (In this device
Touch Sounds are little clicks that indicate you have touched a
button.)

The reason I am using the HDMI output is to demonstrate my app to a
large group.  It is a professional piano tuning app.  I set up an
AudioRecord object for a sample rate of 22050 samples per second.  It
was quite embarrassing for me at a recent presentation I was giving to
a group of professional piano tuners when my app suddenly began
indicating about 9% higher in pitch.  My app had never misbehaved like
that before.  But then I had done only limited testing with the HDMI
output connected.  After the presentation was over I began an
exhaustive test routine.  I still didn't realize the necessity of
having the HDMI connected to witness the failure, so I could not
duplicate the fault.  So finally I plugged in the HDMI to a TV and
found that the audio sample rate would sometimes shift to 20255
samples per second when the user touches one of my app buttons that
makes a click.  Apparently this device shares the audio in and audio
out functions in an undocumented way.  When the operating system
(Android 4.0.3) makes a sound it has a 40% chance of switching the
sample rate.  Once switched, the sample rate stays switched until I
stop and restart the AudioRecord object.  Then I found I could simply
turn off the Touch Sounds option in Settings and my problem went away.

I doubt that this problem is universal.  It probably is due to this
one OEMs implementation of the hardware drivers.  But if you have an
app that uses AudioRecord, keep this possibility in mind.  This table
was a 7" "MID" tablet from some obscure Chinese maker, model T01A,

-- 
-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Android Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to