rewrite player-threads into one thread handling playback