Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Looping a Listperformance #17

Open
Thunder-Dan opened this issue Oct 27, 2011 · 1 comment
Open

Looping a Listperformance #17

Thunder-Dan opened this issue Oct 27, 2011 · 1 comment

Comments

@Thunder-Dan
Copy link

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!

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);
@Jobbies
Copy link

Jobbies commented Feb 9, 2012

I also am having this issue with LoopSource. Can't seem to find out why there is a pause on every loop even when the duration is set.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants