latency enactment brief sounds peep 9, actionscript 3


i've got few unequivocally brief audio clips (less second long) played several events (button hover, click, etc). however, there wholly touching loaf between movement tangible enactment sound. i have attempted both embedding sound .swf, loading presumably during start, nonetheless both lead same results. likewise, i've attempted dense uncompressed audio.



what seems audio buffers only lot longer i need be, maybe peep optimized some-more towards enactment longer sounds but any stumble during responsibility small some-more latency starting sounds. it? there any proceed change them? given i'm operative never need play sounds some-more second enlarged always hallowed totally during start, wouldn't harm during have unequivocally brief buffers.



one illusory thing competence cause: i .wav files controlling loadsound()... i can't indeed play sounds. there's errors, all advantage should, nonetheless tangible sound played, since i have .mp3 currently. maybe controlling .mp3 audio (or any dense audio), there only loaf decoding it? reason i still have doubts this, though, embedding .swf .wav files (by importing library), still have same latency playback.



just reason check, i'll consolidate formula i've got, discount irrelevant tools blunder checking. first, loading during runtime:



var soundarray:array = new array();
loadsound( "click", "sounds/buttondroop4.mp3" );
loadsound( "hover", "sounds/dink-public_d-146.mp3" );

function loadsound( name:string, url:string ):void
{
var req:urlrequest = new urlrequest( url );
soundarray[ name ] = new sound( req );
soundarray[ name ].addeventlistener( event.complete, soundloaded );
}
function soundloaded( event:event ):void
{
for( var name:string soundarray )
{
if( event.target == soundarray[name] )
{
trace( "loaded sound [" + name + "]" );
return;
}
}
}
function playsound( name:string ):void
{
for( var namesrc:string soundarray )
{
if( name == namesrc )
{
var channel:soundchannel = soundarray[ name ].play();
return;
}
}
}

// someday later, good after soundloaded() callback triggered...
playsound( "click" );
playsound( "hover" );


and an swap way, embedding library classes going there:



var sclick:soundclick = new soundclick();
var shover:soundhover = new soundhover();
sclick.play();
shover.play();


the sound files tiny, reduction 10kb generally. loaf apparent adequate initial complaints someone looking during sound effects symbol hovers seemed delayed, wasn't only me being picky. i feel i contingency only doing something wrong; there's too peep things out there have touching sound effects but anywhere circuitously kind lag.



edit: response initial response sound files themselves, i've already checked, sound starts immediately during start record (even writing out all nonetheless unequivocally initial millisecond sound, i still hear start 'tick' sound makes).



Comments

Popular posts from this blog

list macos calm editors formula editors

how hibernate @any-related annotations?

why does floated <input> control floated component slip over too distant right ie7, nonetheless firefox?