vortek
vortek

Reputation: 484

Superpowered audio player pause at position

I'm streaming audio using _audioPlayer->openHLS() and I need to start and stop at specific positions.

The best way seems to be to use loopBetween and then call exitLoop in the LoopEnd event. However, I can't get loopBetween to play!

    _audioPlayer->loopBetween(startTimeMS, stopTimeMs, true, 255, false);

I have tried calling _audioPlayer->play(false) before or after the loopBetween, but then the audio plays without stopping. If I just call loopBetween it never starts playing.

Is there some config I'm missing to get loopBetween to work? The SDK has no sample code covering looping.

EDIT: I've found one way to do this, by polling positionMs in the audio processing callback. I'd still like to know how to make looping work, as that seems like a cleaner solution.

Upvotes: 0

Views: 226

Answers (1)

Gabor Szanto
Gabor Szanto

Reputation: 1329

Looping doesn't work for HLS streams. Polling positionMs in the audio processing callback is a perfect solution.

Upvotes: 2

Related Questions