I would start by sampling the velocity via phent_getvelocity and turn the sound off if the speed is zero. You can sample every second and it will still look and sound realistic without the system taking a big performance hit