Merge "Add a separate thread for writing to audiotracks."