If IOS... Transcribe is fantastic. Super easy to set the loop and the app remembers the loop area the next time you open the song. It works with songs from your iTunes library or files from the browser. It also allows you to set the speed of the loop (and transpose, but drummers, so yea). Super simple interface that only does what I described. The only downside is that it can only recall a single loop per song. You can reset it as many times as you want but it will only remember that last loop that was set before closing the song. I use this app almost every time I sit down to practice.
My solution is the same as Swissward Flamtacles. Audacity a very good open source software, with a computer.
I use it to splice a song in sections also, that way, it's easier to study smaller sections at the time with the repeat mode of any good audio player.. I like Audacious on Linux Mint with the good old Winamp 3 Modern skin.