vendredi 3 mars 2017

AS3 SoundChannel/Sound HZ Limit for importing

I have wav files that are at 1411kbs bit rate and varying frequencies. After I import them into the library and give them unique classes based on their frequency and other information (that is why I use getDefinitionByName below).

All of my wav files play fine in AS3 that are under 6000hz and 8000hz, however those tones don't play properly. However, they do play properly when clicking the Play icon when in Flash Adobe Animate.

I have stripped my code down to the bare essentials to see where the problem lies and still not working properly.

My question is, is there a problem with my code or does AS3/Flash have a limit on the frequency it can play?

var mySound:Sound = new Sound();
var myChannel:SoundChannel = new SoundChannel();

btn.addEventListener(MouseEvent.CLICK, function(){
    var sound_class = "L6000_0";

    var soundTX:SoundTransform = myChannel.soundTransform;
    soundTX.leftToLeft = 1;
    soundTX.leftToRight = 0;
    soundTX.volume = 1;
    soundTX.rightToRight = 0;
    soundTX.rightToLeft = 0;
    var sclass:Class = getDefinitionByName(sound_class) as Class;
    var mySound:Sound = new sclass;

    myChannel =;
    myChannel.soundTransform = soundTX;

Aucun commentaire:

Enregistrer un commentaire