01-10-2013 11:57 PM
Because I can't get any generic examples from Adobe docs to control the volume. I
can attach a newly constructed SoundTransform to the SoundMixer, and the
SoundTransform object constructs using the initial volume setting that I pass it, but when I try to
change the property:
property of the SoundTransform class.
01-11-2013 09:10 AM - edited 01-11-2013 09:12 AM
I don't know if this is relevant, but it works with SoundChannel ...
Also, I think you can't change the properties of a transform while it's attached. I change the volume on the transform and then re-apply - something like this:
mySoundTransform.volume = 1;
myChannel.soundTransform = mySoundTransform;
My app : Get set - Get up! Get ready for the snooze revolution.
01-11-2013 10:02 AM
Thanks. This is turning out to be more complicated than I expected. Basically I'm trying to tween the volume up from zero and down to zero on the beginning and ending of playing a synthesized waveform, in order to get rid of clicks and pops. I hacked something together that uses the onUpdate callback of Tweener.addTween to reapply the transform every time the tweener modifies the soundTransform's volume property, but the clicking and popping remains, and in fact I think I can even hear little clicks as the tweener ramps the volume down - I put a trace in my callback function so I see how many steps the tweener went through as it ramped the volume down, and I think I hear little clicks each time the soundTransform is reapplied.
If anyone has a good known working code snippet for the above scenario, please post.