Export to GitHub

libgdx - issue #552

Sound's loop() method is broken on Android target


Posted on Oct 30, 2011 by Happy Dog

If relevant, please include the simplest possible executable code sample that can reproduce your issue. We have to create this in order to both verify the problem exists and to verify our fix actually fixes the problem, so please help save some of our time by providing a code sample that we can copy and paste to being working on your issue. Thanks!

What steps will reproduce the problem? 1. Create a sound. 2. Play the sound using sound.loop();

What is the expected output? What do you see instead? Expect the sound to loop multiple times. It plays once and that's it.

Bug trace on Android indicates:

10-30 09:57:49.993: ERROR/AudioTrack(31983): setLoop invalid value: loopStart 0, loopEnd 30036, loopCount -1, framecount 3072, user 0

What version of libgdx are you using? If not the SVN trunk, please try that before filing a bug.

Nightlies, 20111030

Please provide any additional information below.

Comment #1

Posted on Oct 30, 2011 by Grumpy Camel

Fixed in r2858, thanks!

Comment #2

Posted on Aug 7, 2014 by Quick Dog

Comment deleted

Comment #3

Posted on Aug 7, 2014 by Quick Dog

You can use Music instead of Sound, then use music.setLooping(true)

Status: Fixed

Labels:
Type-Defect Priority-Medium