maxl0rd/standingwave3 — Issue #17: Looping a Listperformance
Author: Thunder-Dan
Created: 2011-10-27 14:03:14+00:00
State: open

Hey maxl0rd,

I tried creating a Listperformance and looping it. See my code for details:
I expected the loop to be played back steadily and without gaps.
Why is there a pause after every 4 beeps? Did I make a stupid mistake?
Is there maybe an easier way to achieve this?
Thanks in advance - the library is awesome!

```actionscript
var sequence:ListPerformance = new ListPerformance();
for (var i:int = 0;i<4;i++) {
sequence.addSourceAt( i/2 , new SineSource(new AudioDescriptor(), 0.1, 440));
}

// Play it back.
var source:IAudioSource = new AudioPerformer(sequence, new AudioDescriptor(44100,2));

var mySample:Sample = source.getSample(source.frameCount)
var myLoop:LoopSource = new LoopSource(source.descriptor, mySample);
myLoop.firstFrame = 0;
myLoop.startFrame = 0;
myLoop.endFrame = source.frameCount;

var player:AudioPlayer = new AudioPlayer();
player.play(myLoop);

```