Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Adobe AIR Development

Posts: 1,269
Registered: ‎12-29-2010
My Device: PlayBook, Z10 LE, Dev Alpha C

SoundTransform volume property writes not taking

So, does audio volume control via flash.media.SoundMixer just not work on BB10?


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:




programmatically, it refuses to take.  Per the Adobe ASdocsvolume is a public writeable

property of the SoundTransform class.


Posts: 194
Registered: ‎11-12-2010
My Device: Not Specified

Re: SoundTransform volume property writes not taking

[ Edited ]

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.

Posts: 1,269
Registered: ‎12-29-2010
My Device: PlayBook, Z10 LE, Dev Alpha C

Re: SoundTransform volume property writes not taking

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.