WIP: audio prep work for gapless

Still have some loose ends, but opening PR so people can start looking at this.
"event" is mentioned twice: s/reached_end_of_stream event/reached_end_of_stream()/