Exemple #1
0
 public void Stop()
 {
     lastSongInformation    = currentSongInformation;
     currentSongInformation = null;
     if (movie == null)
     {
         return;
     }
     movie.Dispose();
     movie = null;
 }
Exemple #2
0
        public void Change(SongInformation songInfo, bool reload)
        {
            if (songInfo != null && (reload || currentSongInformation != songInfo))
            {
                if (movie != null)
                {
                    movie.Dispose();
                    movie = null;
                }

                if (!songInfo.IsPPDSong)
                {
                    return;
                }

                if (PPDSetting.Setting.MenuMoviePreviewDisabled)
                {
                    OnMovieChanged();
                    return;
                }

                movie = new MovieComponent(device, gameHost.GetMovie(songInfo));
                try
                {
                    movie.Movie.Initialize();
                    movie.Movie.TrimmingData  = songInfo.TrimmingData;
                    movie.Movie.MaximumVolume = songInfo.MovieVolume;
                    movie.SetLoop(songInfo.ThumbStartTime, songInfo.ThumbEndTime);
                    movie.Movie.Seek(songInfo.ThumbStartTime);
                    movie.Movie.Play();
                    movie.Movie.FadeIn();
                    OnMovieChanged();
                }
                catch
                {
                    OnMovieChangeFailed();
                }
            }
            currentSongInformation = songInfo;
        }