Added support for audio, video, and input latency compensation.
Added settings; stores global settings.