Module baal::effect::persistent [] [src]

this module allow to play persistent sound effects

volume = global_volume * effect_volume * sum(distance(position,listener_position))

but once a sound effect is played at a volume it doesn't change its volume anymore

this can lead to weird effects for not so short sound effects and with moving source

also if its volume is zero then the sound is not played at all

Functions

add_position

add a new source of the effect

add_positions

add a vec of new sources of the effect

add_positions_for_all

add a vec of new sources of the effects

clear_positions

remove all sources of the effect

clear_positions_for_all

remove all sources of all effects

update_volume

update the volume of effect computed from sources position and listener position at the moment of this call

update_volume_for_all

update the volume of all effect