Stupid Microphones (An Empty Room post compo)

In making An Empty Room, my Ludum Dare 22 entry, I foolishly overlooked the fact that not all microphones are the same. This means that different microphones give different results when Flash calculates a microphone’s activity level, which is what I use to gauge microphone volume in An Empty Room.

Then it came to my attention that some people couldn’t play my game, because, regardless of how much noise they made, they were unable to make enough to start the game.

The game works great on my laptop, using my laptops internal microphone, since that’s what I tuned the game for. In fact I cranked Flash’s gain way down so that my laptop’s microphone gave reasonable levels, instead of always maxing the activity level to 100%.

Sort of a foolish oversight on my part. I even had a second, usb, microphone which I used to record sounds, that I could have tested with, but it never occurred to me to do so. Testing now, my usb microphone does seem to give slightly lower levels than my laptop’s internal.

Anyways, I went and made a post competition version of An Empty Room. This version has a configuration menu that lets you adjust Flash’s microphone gain, so that should solve the problem of people not being able to start the game. Otherwise the game is essentially the same.

Feel free to ignore this version for rating purposes. There’s less than two days left in the voting period anyways.

I toyed with a couple other methods of solving the volume problem, but this seemed like the easiest solution that was reasonable. The effect of gain on volume is not linear, which makes automatically adjusting the gain to match the desired levels a pain. And since Flash seems to round off the activity level to an integer percentage (capped at 100%) using lower baselines for quieter mics would result in less precision.

The other option would have been to calculate volume myself directly from the samples instead of simply using Flash’s microphone activity level. I have no idea how Flash calculates it anyways. Doing things myself would involve me figuring out how exactly to do so in the first place and would require me to rework who the effects are calculated in game, since I would be using a different measurement than Flash’s vague percentage. Which is far more extensive than I wanted to make this little update.

An Empty Room’s entry page is here, which has links to both the compo version and this new version.