コード例 #1
0
ファイル: CBackgroundMusic.cs プロジェクト: zhaozw/Vocaluxe
 public static void Play()
 {
     if (CConfig.BackgroundMusic == EOffOn.TR_CONFIG_ON)
     {
         if (_AllFileNames.Count > 0)
         {
             if (_CurrentMusicStream != -1)
             {
                 CSound.Fade(_CurrentMusicStream, CConfig.BackgroundMusicVolume, CSettings.BackgroundMusicFadeTime);
                 CSound.Play(_CurrentMusicStream);
                 _Playing = true;
             }
             else
             {
                 Next();
             }
         }
     }
 }
コード例 #2
0
ファイル: CBackgroundMusic.cs プロジェクト: winterdl/Vocaluxe
        public static void Play()
        {
            if (_Playing)
            {
                return;
            }

            if (CConfig.BackgroundMusic == EOffOn.TR_CONFIG_ON)
            {
                if (_AllFileNames.Count > 0)
                {
                    if (_CurrentMusicStream != -1)
                    {
                        CSound.Fade(_CurrentMusicStream, 100f, CSettings.BackgroundMusicFadeTime);
                        CSound.Play(_CurrentMusicStream);
                        if (_VideoEnabled && _Video != -1)
                        {
                            CVideo.VdResume(_Video);
                        }
                        _Playing = true;
                    }
                    else
                    {
                        Next();
                    }

                    if (!IsBackgroundFile(_CurrentPlaylistElement))
                    {
                        _CanSing = true;
                    }
                    else
                    {
                        _CanSing = false;
                    }
                }
            }
        }
コード例 #3
0
ファイル: CMain.cs プロジェクト: da-ka/Vocaluxe
 public void Fade(int soundStream, int targetVolume, float duration, EStreamAction afterFadeAction = EStreamAction.Nothing)
 {
     CSound.Fade(soundStream, targetVolume, duration, afterFadeAction);
 }