Play an audio subsegment

I want to play back a subsegment of an audio, and while I can specify a precise starting point, it’s not clear what the best approach would be for ensuring it stops playing where I want it. Obviously I can get status updates at a high rate (for better precision) and stop the audio when the endpoint is reached. Is there some better way to do this?