For foobar2000 v2 and newer: Repeat part of track.
Activate Loop, play track, set start position, play some time, set end position: Loop
Requirements: https://www.foobar2000.org/SDK
https://www.foobar2000.org/download