[RESOLVED] Music loop quits after one play

Using build 1137, only tested on the Simulator so far.   This looks easy, I must be missing something.   The background music plays one loop and stops, whether I specify loops as -1, 2, 100…

myThemeSong = audio.loadStream("theme.mp3") audio.play(myThemeSong, { loops=-1, channel=MUSIC\_CHANNEL})

Solved.   For the millionth time in one million instances, a programmer error, not a problem with the API.   :slight_smile:

I was setting the loops in the options, but not passing them down to the function that actually calls audio.play.   I wrap it so I only have to check the settings in one place to see if sound is enabled.

Solved.   For the millionth time in one million instances, a programmer error, not a problem with the API.   :slight_smile:

I was setting the loops in the options, but not passing them down to the function that actually calls audio.play.   I wrap it so I only have to check the settings in one place to see if sound is enabled.