refactor fade_in/fade_out to drive volume_db directly and decouple from play/stop
Fades are now pure volume ramps: they no longer call play(), stop(), or unpause. The animation is visible on the volume_db property each frame. Track _target_volume_db separately so fade_in/fade_out round-trips return to the user's set level instead of a transient lerp value, and skip the "snap to silent" when interrupting an in-flight player or per-song crossfade so audible state is preserved. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 4.7
parent
1e53fb83d1
commit
5204295864
@@ -38,7 +38,7 @@ var _core : DynamicSoundPlayerCore;
|
||||
|
||||
func _set(property: StringName, value: Variant) -> bool:
|
||||
if property == &"volume_db":
|
||||
if _core: _core.apply_stream_volumes(value);
|
||||
if _core: _core.on_volume_db_set(value);
|
||||
return false;
|
||||
return false;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user