AudioService.CrossfadeMusic(IMusic, float, int, long, string) Method
Definition¶
Namespace: Brine2D.Audio
Crossfades from the currently playing music to music over duration seconds. If no music is playing or duration is \<= 0, behaves identically to PlayMusic(IMusic, int, long, string). Call Update(float) each frame to advance the fade.
public void CrossfadeMusic(Brine2D.Audio.IMusic music, float duration, int loops=-1, long loopStartMs=0L, string? bus=null);
Parameters¶
music IMusic
duration System.Single
loops System.Int32
loopStartMs System.Int64
When looping, the track loops back to this position in milliseconds instead of the beginning. This allows an intro section before the loop point. Default 0.
bus System.String
Bus name to tag the music track with. Defaults to "music" when null.