DCE breaks audio fade using Actuate SoundTransform on html target

Compiling to HTML -final, (using dead-code-elimination) - i’m experiencing an error when using actuate to fade in music.

The following lines of code create the error

musicchannel = mymusic.play(0, 0, zerovolume);   
Actuate.transform(musicchannel, 3).sound(1, 0);

The error is specifically “Cannot set property ‘volume’ of undefined” - generated by TransformActuator.hx:157 ,

Having read up on DCE, I realise i need to work out what is being removed by DCE within openfl’s sound / soundtransform classes and add a @:keep in front of it, but i’m struggling to figure what is being removed !

The same Actuate line exist in the “PlayingSound” example. When the example is run with DCE the volume doesn’t fade in (and the error i received above isn’t generated either)

Does setting @:keep on SoundTransform do it? SoundChannel?

great, thanks for the pointer, setting @:keep on SoundChannel does fix it .

more specifically, setting @:keep on Sounchannel.get_soundTransform() fixes it ! (line 169)

@:keep @:noCompletion private function get_soundTransform ():SoundTransform {

I shall try to figure out hithub and suggest the amendment.

I’ve added a @:keep for now, perhaps (in the future) Actuate can automatically create the references it needs to prevent DCE