deep-entertainment / issues

Issue tracker for deep Entertainment projects
1 stars 0 forks source link

[EGOVENTURE] Enhancement of Boombox cross-fading to avoid gaps #39

Closed ThmsKnz closed 1 year ago

ThmsKnz commented 1 year ago

Please make sure you talk to the community before creating an issue.

Describe the bug The current Boombox transition of background and music in the Tween is fading out fast and fading in late. This is being noticed when a steady background noise is being played like a waterfall sound.

To Reproduce It cannot be tested directly in the example game. Assume there's a waterfall background_1 and a waterfall background_2 which only differ in the volume (because you're getting nearer to the waterfall). When calling Boombox.play_background(<background 2>) while background 1 is being played the waterfall sound 1 stops quickly, then there's some pause and then waterfall sound 2 is fading in.

Expected behavior The expected behavior would be that the cross fading should steadily switch from waterfall sound1 to sound2 without a gap. The ideal behaviour of the cross fading is that starting from steady sound to the identical steady sound is hardly being noticed. I've therefore run some cross-fading tests with a 440Hz sinus wave.

The best result could be achieved with these Tween settings:

Transition Type Tween.TRANS_EXPO for fading in and out and Ease Type Tween.EASE_IN for fading out, Tween.EASE_OUT for fading in

Versions

Additional context I'll add a Pull Request for this suggested change.