How to control volume sound on cpp target?

How to control volume sound on cpp target?

CPP target, where i go from here?
sndenemyExplosion = Assets.getSound(“sound/explode.wav”);???

HTML5 target -> this work on html5,
enemyExplOptions = {src: [‘sound/explode.wav’]};
sndenemyExplosion = new Howl(enemyExplOptions);

The sound itself won’t play until you do “.play()”

That will return a “SoundChannel” object that has a transform where you can set a volume

Shoot, thanks man. i figured it out. i just need to set the value to something like sound.volume= 0.02, instead of sound.volume= 0.2.


sndenemyExplosion = Assets.getSound(“sound/explode.wav”);

	channel =;
	var transform:SoundTransform = new SoundTransform();
	transform.volume = 0.02;
	channel.soundTransform = transform;
1 Like