decoder/sndfile: refactor frame_to_time()