Refactored code for easier change. Update Codec for AudioStream to be have lower latency