On Aug 28, 7:39 pm, Robert Green <rbgrn....@gmail.com> wrote:

> It's no secret that both the HTC Dream and HTC Magic have problems
> with sound from the built-in speaker interfering with the
> accelerometer.  I'm currently having the problem with my new game and
> am not sure how I'm supposed to work around it.  Quite frankly, the
> sound is a big part of the game and most people prefer to play with it
> on.  I found a great way to use tilt-view control and it works really
> well until I turn sound on, then it all goes to crap.
>
> Sure, I could crank the sample rate up to highest and take a running
> average of the past 5 or so samples and pull out the outliers but it's
> still not very accurate.

Ugh, if your observation is accurate this sounds like a system design
bug.   Average actually won't fully work, because the sensor needs to
be low pass filtered before the analog to digital conversion, in order
to keep any frequency components above its nyquist limit out of the
digitizer.   Otherwise you will get really odd effects if you have an
audio frequency that's near a multiple of the sample rate... they can
alias back to near zero frequency and look like very slow variations
in reading, which would go right through your averaging.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to