SebLague/Create-a-Game-Source

Music cross fade bug

Opened this issue · 0 comments

umaqs commented

Music cross fade bug has this little bug.
How to reproduce:

  1. Play level from Menu scene and return back to menu.
  2. Change master volume from options menu.

As both resources are playing a clip and in cross fading coroutine, only volume is set to 0. Changing the volume would change it for both of sources and you can hear both of musics playing at same time.

How to Fix :
Adding the following line at the end of "AnimateMusicCrossFade" method should fix it.
musicSources [1 - activeMusicSourceIndex].Stop();