I’ve got an issue with long songs while using AVPlayer.
I have tested it on a 64 min song.
The issue is: when the AVPlayer buffer is full it stops playback (rate = 0.0f) and stops to download new timeRanges. When I resume playback manually it plays for some seconds and stops again. I think it continues to download new content to buffer but this process is very slow and is not suitable for gapless playback.
Is it possible to control this situation to achieve gapless playback?
Am I allowed to modify loaded time ranges (clean the buffer) during playback?
Am I allowed to increase buffer size?
Are you running it on the main thread? Try to do something like this:
If that doesn’t work I’d suggest giving OpenAL a try.