in reply to real-time volume auto adjusting
Umm, as was mentioned, this is a hard one. Didn't you ever wish your car radio would automatically adjust volume based on ambient cabin noise (going 65 with windows open vs parked in driveway)?? I also feel Perl is likely the wrong tool for this job. This sort of realtime stuff is usually done in C or assembly code (yikes!).
good luck with this, aquarium!