You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have the following code and the "COMPLETE" event never fires. I have the com folder in the same directory as my .fla, and the awave.swc in my library path.
I am also getting "AUDIO CLIPPING" repeatedly traced out to the output panel. I changed the amplitude to 0.2 and even -5.0 it still plays just as loudly. I assume the amplitude is for the loudness? I thought lowering it would make the "AUDIO CLIPPING" go away and maybe that has something to do with the "COMPLETE EVENT" not firing.
var player:AudioPlayer = new AudioPlayer();
play_btn.addEventListener(MouseEvent.CLICK,playSinewave);
function playSinewave(e:Event):void{
var sinewave:IAudioSource = new SineSource(new AudioDescriptor(),5,440,0.2);
play_btn.enabled = false;
player.addEventListener(Event.COMPLETE,doComplete);
player.play(sinewave);
}
function doComplete(e:Event):void{
trace("COMPLETE")
play_btn.enabled = true;
}
The text was updated successfully, but these errors were encountered:
In the AudioPlayer constructor it adds a listener for SOUND_COMPETE and in the handler dispatches that same event so I'm guessing you should probably listen for that.
I have the following code and the "COMPLETE" event never fires. I have the com folder in the same directory as my .fla, and the awave.swc in my library path.
I am also getting "AUDIO CLIPPING" repeatedly traced out to the output panel. I changed the amplitude to 0.2 and even -5.0 it still plays just as loudly. I assume the amplitude is for the loudness? I thought lowering it would make the "AUDIO CLIPPING" go away and maybe that has something to do with the "COMPLETE EVENT" not firing.
import com.noteflight.standingwave3.elements.*
import com.noteflight.standingwave3.filters.*
import com.noteflight.standingwave3.formats.*
import com.noteflight.standingwave3.generators.;
import com.noteflight.standingwave3.modulation.;
import com.noteflight.standingwave3.output.*
import com.noteflight.standingwave3.performance.;
import com.noteflight.standingwave3.sources.;
import com.noteflight.standingwave3.utils.*;
import flash.events.Event;
var player:AudioPlayer = new AudioPlayer();
play_btn.addEventListener(MouseEvent.CLICK,playSinewave);
function playSinewave(e:Event):void{
var sinewave:IAudioSource = new SineSource(new AudioDescriptor(),5,440,0.2);
play_btn.enabled = false;
player.addEventListener(Event.COMPLETE,doComplete);
player.play(sinewave);
}
function doComplete(e:Event):void{
trace("COMPLETE")
play_btn.enabled = true;
}
The text was updated successfully, but these errors were encountered: