Fixed mistakes in simple audio gain, and added back the idea of using resize event.