Seek to 0, to allow loop

This commit is contained in:
nemunaire 2019-08-19 17:21:51 +02:00
parent 6f28271e47
commit 9aa0b3fe29
1 changed files with 3 additions and 0 deletions

View File

@ -105,6 +105,9 @@ func main() {
playedItem = 0
}
// In case of loop, ensure we are at the beginning of the stream
playlist[playedItem].Seek(0)
// Resample if needed
if formats[playedItem].SampleRate != SampleRate {
return beep.Resample(3, formats[playedItem].SampleRate, SampleRate, playlist[playedItem])