WIP: audio prep work for gapless

Still have some loose ends, but opening PR so people can start looking at this.
Copy paste...