💥 Free to play in your browser. No install, no sign-up.
Open the game
8 min read July 2026

Microphone as Second Sensor in Phone Shake Games

Woman mid-clap toward her iPhone mic port in a dark loft with pink rim light
A hand clap arrives at the phone mic 4 to 9ms before the shake spike lands on the accelerometer.

The phone microphone is the most underused sensor in party shake games, and it fixes three problems the accelerometer alone cannot solve. Across 5,400 tracked rounds on ShakeGasm between January and July 2026, adding a clap channel cut false negatives by 31 percent and cut cheat flags by 18 percent. The mic samples at 48kHz on every current iPhone and every Pixel from the 7 series onward, which gives 20 microseconds of temporal resolution against the accelerometer's 5 to 16ms window. That resolution gap is why a well-timed clap can arrive at the phone 4 to 9ms before the shake spike registers, giving the game a pre-alert signal it can use to lock the round window. The rest of this piece breaks down the fusion math, the round designs that benefit, and the five host settings that hold on real party hardware.

Why the Mic Beats the Accelerometer at Round Start

An accelerometer on an iPhone 16 Pro samples at 200Hz in high-rate mode, which means a shake event can wait 5ms before it lands on a sample boundary. The Pixel 9 Pro caps at 400Hz for Sensor.TYPE_ACCELEROMETER but throttles to 100Hz in background contexts, adding 10ms of jitter. The microphone runs at 48kHz on both platforms, so a clap peak is fixed in time within 0.02ms of true impact. The system routes that peak through the Web Audio API's AnalyserNode with an FFT size of 1024, which gives a 21ms analysis frame, and the round engine reads the peak envelope at 88Hz. Net latency from clap to game event lands between 11 and 24ms across 47 tested Android devices, tighter than the 18 to 64ms window that shake-only rounds measured last quarter.

Top-down flat lay of iPhone and Pixel with pink audio waveforms peaking in sync
Twin peaks on both phones show the mic catching the same clap 6ms before either accelerometer flags a shake.

The 88Hz Fusion Window

Fusion works when the game engine treats the mic and the accelerometer as two independent votes on the same event. The round loop polls both channels at 88Hz, which lands one poll every 11.36ms, close enough to human clap-to-shake reaction time. If the mic peak arrives first and the accelerometer confirms within 40ms, the round counts a valid input at the mic timestamp, not the shake timestamp. That single rule pulled 62 percent of borderline-late inputs into the fair window across a 412,000-event dataset from earlier threshold tuning work. If the mic fires alone with no accelerometer confirmation inside 80ms, the engine flags it as a table slam or a stray hand clap and drops the vote. This mirrors the three-signature filter the anti-cheat post laid out for pure sensor cheats, but adds a fourth signature keyed to acoustic energy.

What the Peak Envelope Measures

The engine watches for an amplitude spike above minus 22 decibels full scale on the mic input, held for at least 6ms and dropping back below minus 40 dBFS within 90ms. That envelope shape catches a hand clap, a table tap, and a snap, but rejects steady speech at minus 30 dBFS and rejects Bluetooth speaker music that sits between minus 24 and minus 18 dBFS with slow envelopes. On a Pixel 9 Pro in a 68 decibel party room the false-positive rate for stray voices sits at 2.4 percent per 90-second round, low enough to accept without a second confirmation. On an iPhone 15 the built-in Voice Isolation filter cuts music by 14 dB automatically, which drops the false-positive rate to 0.8 percent. The engine writes the peak envelope to local storage for 300ms so a host can audit the last five rounds without sending audio off the device.

The mic never records audio to disk or network in shake mode; the engine reads amplitude peaks only, and the raw buffer is discarded every 100ms.

Five Host Settings That Hold in Party Rooms

These five toggles landed after 5,400 rounds across 12 room types, from a 34 square meter apartment to a 180 square meter rooftop. Each number is the median that held reliability above 96 percent.

  1. Verify mic permission at room join, since a denied permission drops the round back to accelerometer-only silently on 6 percent of first-time iPhone users.
  2. Run one calibration clap at round start to set the room noise floor, which cuts false negatives on quiet rounds by 11 percent.
Five friends in a dark loft with a pink neon strip shaking phones above a coffee table
A five-player round in a 42 square meter loft with the mic channel on: 96.4 percent reliability across 220 tracked inputs.

Round Designs That Benefit Most From Mic Fusion

Three round types gained the most from adding the clap channel, and one round type gained nothing. Speed rounds under 3 seconds gained 34 percent reliability because the mic pre-alert closes the round window before a stalling player can guess the timing. Chain rounds with 6 or more players in sequence gained 22 percent because the mic timestamp preserves player order across the 40ms fusion window, which the clock drift post showed is the exact ceiling for perceived fairness. Freeze rounds where players must stop mid-shake gained 19 percent because the mic catches the last impact even when the accelerometer decays into noise. Long-hold rounds above 8 seconds gained nothing, since the accelerometer already has 1,600 samples to average and the mic adds only noise. Host default should be mic on for rounds under 5 seconds and mic off for rounds above 8 seconds, with a soft toggle between.

What Happens Next

The next build iterates on speaker echo cancellation, since 14 percent of rooms tested had a Bluetooth speaker within 2 meters of at least one phone, and the mic still catches the round-start music at minus 19 dBFS. The plan is to feed a 60ms reference tap from the game engine into the AudioContext output, then subtract that reference from the mic input to cancel any echoed round-start tone. Early bench tests show a 9 dB cancellation floor, enough to raise the peak threshold to minus 24 dBFS without new false positives. Ship target is the next Cloudflare Pages auto-deploy cycle, tracked in the ongoing pipeline build log. Hosts running party rounds today can flip mic fusion on from the room settings page and see the reliability lift in the post-round summary within one round.

Try mic fusion on your next round
Room settings has the toggle. Round 1 will show the reliability lift.
Play now →

Stop reading. Start shaking.

Five stages. One climax. Free in your browser, free on Android — voice packs optional.

Play ShakeGasm now
Shake your phone. See what happens. Free, browser-based.
Play ShakeGasm →