Add some experimental fading APIs to the engine API.
This is a simplified and somewhat more intuitive way of handling fades. With these APIs, fades are applied immediately, whereas with the old fading APIs the fades were scheduled. The old APIs still exist, but may be removed. The ma_sound_set_fade_in_frames/milliseconds() API sets the fade which will be applied immediately. If the starting volume is negative, the fade will start from the current fade volume. This will also overwrite any existing fade that is already happening. The ma_sound_get_current_fade_volume() API allows you to retrieve the current volume of the fade. The fade is layered on top of the normal volume parameter. I.e. they are configured and applied to the signal interdependently. Currently, all fades are applied linearly.
Showing
This diff is collapsed.
Please register or sign in to comment