Rewrote end-of-track handling to use whether the circular buffer is empty (together with end of track being signalled) as an indication that all data for the current track has been sent to output