Beispiel #1
0
        public void Play(MusicAudioSource musicSource)
        {
            currentLength = Length;
            source        = musicSource;
            source.SetVolume(1f, Settings.MusicVolume * Settings.MasterVolume);

            // Queue first buffers
            for (int i = 0; i < MusicAudioBufferRotator.BufferCount - 1; i++)
            {
                source.QueueBuffer(nextBuffer());
            }
        }
Beispiel #2
0
 public void SetVolume(float volume)
 {
     source?.SetVolume(volume, Settings.MusicVolume * Settings.MasterVolume);
 }