Closed jamestyner closed 12 years ago
Clipping happens when you playback a signal at digital full scale, aka 1.0. You are playing a sine wave at full scale so it's going to clip on every peak. Reduce the amplitude to 0.5 or something and this problem will go away.
Also, trace output completely destroys performance. Your window is probably tracing "clipping" 100s of times per second which is going to make the playback blow up.
I changed it to 0.5 and it still happens. I even changed it to -1.0 and it happens even still.
Also the complete event is still not firing.
I cannot get the complete event to fire. I have a button that calls the following code.
private function playSinewave(e:Event):void{ e.target.enabled = false; sinewave = new SineSource(new AudioDescriptor(),5,440,1.0); player.addEventListener(Event.COMPLETE,onPlaybackComplete); player.play(sinewave); }
private function onPlaybackComplete(e:Event):void{ sinewave_play_btn.enabled = true; }
Also with this code the output Panel Repeatedly traces AUDIO CLIPPING. And at times it will Stutter real bad and sometimes even freeze up the player and issue a 15 second timeout warning.