Ejemplo n.º 1
0
 void HandleRenderPlaylist(IPlayList playlist)
 {
     if (RenderPlaylist != null)
     {
         RenderPlaylist(playlist);
     }
 }
Ejemplo n.º 2
0
    private void PlaySFX(GameObject objectOfCollision)
    {
        //Debug.Log("Ball collides with " + collision.gameObject.tag);
        if (SFXPlayer && SFXPlayer.GetVolume() != 0f)
        {
            //print("Ball: PlaySFX: collision.tag: " + collision.gameObject.tag);
            switch (objectOfCollision.tag)
            {
            case "Unbreakable": SFXPlayer.PlayClip(unbreakableSound); break;

            case "Paddle": SFXPlayer.PlayClip(paddleSound); break;

            case "Wall": SFXPlayer.PlayClip(wallBounceSound); break;

            //case "LoseColider": AudioSource.PlayClipAtPoint(loseSound,transform.position, SFXPlayer.GetVolume()); break;
            default: {
                IPlayList B = objectOfCollision.GetComponent <Brick>();
                if (B != null)
                {
                    //print("Ball: PlaySFX: collision.gameObject is Brick class, PlayListID is: " + B.GetPlayListID().ToString());
                    SFXPlayer.PlayRandomSoundFromList(B.GetPlayListID());
                }
                else
                {
                    SFXPlayer.PlayRandomSoundFromList(SoundSystem.PlayListID.Brick);
                }
            }; break;
            }
        }
    }
Ejemplo n.º 3
0
 private void EmitRenderPlaylist(IPlayList playlist)
 {
     if (RenderPlaylistEvent != null)
     {
         RenderPlaylistEvent(playlist);
     }
 }
Ejemplo n.º 4
0
    private void PlaySFX(GameObject objectOfCollision)
    {
        //Debug.Log("Ball collides with " + collision.gameObject.tag);
        if (SFXPlayer && SFXPlayer.GetVolume() != 0f && hasStarted)
        {
            //print("Ball: PlaySFX: collision.tag: " + objectOfCollision.gameObject.tag);
            switch (objectOfCollision.tag)
            {
            case tags.UNBREAKABLE: SFXPlayer.PlayClipOnce(unbreakableSound); break;

            case tags.PADDLE: SFXPlayer.PlayClipOnce(paddleSound); break;

            case tags.WALL: SFXPlayer.PlayClipOnce(wallBounceSound); break;

            case tags.PICKUP:; break;

            default: {
                IPlayList B = objectOfCollision.GetComponent <IPlayList>();
                if (B != null)
                {
                    //print("Ball: PlaySFX: collision.gameObject is IPLayList class, PlayListID is: " + B.GetPlayListID().ToString());
                    SFXPlayer.PlayRandomSoundFromList(B.GetPlayListID());
                }
                else
                {
                    //print("Ball/PlaySFX: failed getting PlayListID, playing BrickSounds, after hitting object: " + objectOfCollision.name);
                    SFXPlayer.PlayRandomSoundFromList(SoundSystem.PlayListID.Brick);
                }; break;
            }
            }
        }
    }
Ejemplo n.º 5
0
        public List <EditionJob> ConfigureRenderingJob(IPlayList playlist)
        {
            VideoEditionProperties vep;
            List <EditionJob>      jobs = new List <EditionJob>();
            int response;

            if (playlist.Count == 0)
            {
                WarningMessage(Catalog.GetString("The playlist you want to render is empty."));
                return(null);
            }

            vep = new VideoEditionProperties();
            vep.TransientFor = mainWindow as Gtk.Window;
            response         = vep.Run();
            while (response == (int)ResponseType.Ok)
            {
                if (!vep.SplitFiles && vep.EncodingSettings.OutputFile == "")
                {
                    WarningMessage(Catalog.GetString("Please, select a video file."));
                    response = vep.Run();
                }
                else if (vep.SplitFiles && vep.OutputDir == "")
                {
                    WarningMessage(Catalog.GetString("Please, select an output directory."));
                    response = vep.Run();
                }
                else
                {
                    break;
                }
            }
            if (response == (int)ResponseType.Ok)
            {
                if (!vep.SplitFiles)
                {
                    jobs.Add(new EditionJob(playlist, vep.EncodingSettings));
                }
                else
                {
                    int i = 0;
                    foreach (PlayListPlay play in playlist)
                    {
                        EncodingSettings settings = vep.EncodingSettings;
                        PlayList         pl       = new PlayList();
                        string           filename = String.Format("{0}-{1}.{2}", i.ToString("d4"), play.Name,
                                                                  settings.EncodingProfile.Extension);

                        pl.Add(play);
                        settings.OutputFile = Path.Combine(vep.OutputDir, filename);
                        jobs.Add(new EditionJob(pl, settings));
                        i++;
                    }
                }
            }
            vep.Destroy();
            return(jobs);
        }
Ejemplo n.º 6
0
 public Job(IPlayList playlist, EncodingSettings encSettings,
            bool enableAudio, bool overlayTitle)
 {
     Playlist         = Cloner.Clone(playlist);
     EncodingSettings = encSettings;
     EnableAudio      = enableAudio;
     OverlayTitle     = overlayTitle;
     State            = JobState.NotStarted;
 }
Ejemplo n.º 7
0
        public DroidMediaPlayer(IPlayList playlist, IFileService fileService)
        {
            player             = new MediaPlayer();
            this.playlist      = playlist;
            this.fileService   = fileService;
            player.Completion += On_Current_Track_Completion;

            fileService.CreateFolderLocationIfNotExist();
        }
Ejemplo n.º 8
0
        public Job(IPlayList playlist, EncodingSettings encSettings,
		            bool enableAudio, bool overlayTitle)
        {
            Playlist = Cloner.Clone(playlist);
            EncodingSettings = encSettings;
            EnableAudio = enableAudio;
            OverlayTitle = overlayTitle;
            State = JobState.NotStarted;
        }
Ejemplo n.º 9
0
 public void Init()
 {
     _repo = new PlayListMemory();
     pl0 = new PlayList { Name = "pl0", Description = "zero playlist" };
     pl1 = new PlayList { Name = "pl1", Description = "first playlist" };
     pl2 = new PlayList { Name = "pl2", Description = "second playlist" };
     _repo.Add(pl0);
     _repo.Add(pl1);
     _repo.Add(pl2);
 }
Ejemplo n.º 10
0
 public void Load(IPlayList playlist)
 {
     this.playlist  = playlist;
     label1.Visible = false;
     newvideobutton.Show();
     playlisttreeview1.PlayList  = playlist;
     playlisttreeview1.Sensitive = true;
     savebutton.Sensitive        = true;
     Model = playlist.GetModel();
 }
Ejemplo n.º 11
0
        ListStore GetModel(IPlayList playlist)
        {
            ListStore listStore = new ListStore(typeof(PlayListPlay));

            foreach (PlayListPlay plNode in playlist)
            {
                listStore.AppendValues(plNode);
            }
            return(listStore);
        }
Ejemplo n.º 12
0
 public void Load(string filePath)
 {
     try {
         playlist = PlayList.Load(filePath);
         playlistWidget.Load(playlist);
     } catch (Exception e) {
         Log.Exception(e);
         guiToolkit.ErrorMessage(Catalog.GetString("The file you are trying to load " +
                                                   "is not a playlist or it's not compatible with the current version"));
     }
 }
Ejemplo n.º 13
0
 public void Load(string filePath)
 {
     try {
         playlist = PlayList.Load(filePath);
         playlistWidget.Load(playlist);
     } catch (Exception e){
         Log.Exception (e);
         guiToolkit.ErrorMessage(Catalog.GetString("The file you are trying to load " +
             "is not a playlist or it's not compatible with the current version"));
     }
 }
Ejemplo n.º 14
0
 public void Load(string filePath)
 {
     try {
         playlist = PlayList.Load(filePath);
         playlistWidget.Load(playlist);
     } catch (Exception e) {
         Log.Exception(e);
         MessagePopup.PopupMessage(playlistWidget as Gtk.Widget, MessageType.Error,
                                   Catalog.GetString("The file you are trying to load is not a playlist or it's not compatible with the current version"));
     }
 }
Ejemplo n.º 15
0
 /// <summary>
 /// Fires as soon as a menu item are selected on the GUI
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void OnPlayListTap(object sender, ItemTappedEventArgs e)
 {
     if (sender is ListView)
     {
         ListView mi = (ListView)sender;
         if (mi.SelectedItem is IPlayList)
         {
             SelectPlayListButton.IsEnabled = true;
             selectedPLaylist = (IPlayList)mi.SelectedItem;
         }
     }
 }
Ejemplo n.º 16
0
        public EditPlaylist(IPlayList iplayList)
        {
            playList = iplayList;
            TracksPosibleToBeAdded = new ObservableCollection <ITrackSimple>();

            InitializeComponent();

            PLaylistName.Text = playList.Name;

            GetAllTracks();
            GetPlayListTracks();
        }
Ejemplo n.º 17
0
        protected virtual void OnRenderPlaylistEvent(IPlayList playlist)
        {
            List <EditionJob> jobs = guiToolkit.ConfigureRenderingJob(playlist);

            if (jobs == null)
            {
                return;
            }
            foreach (Job job in jobs)
            {
                videoRenderer.AddJob(job);
            }
        }
Ejemplo n.º 18
0
 /// <summary>
 /// Navigates to the Page where editing a playlist is possible.
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private async void EditPlayList(object sender, EventArgs e)
 {
     if (sender is MenuItem)
     {
         MenuItem mi = (MenuItem)sender;
         Console.WriteLine(mi.CommandParameter);
         if (mi.CommandParameter is IPlayList)
         {
             selectedPLaylist = (IPlayList)mi.CommandParameter;
             await Navigation.PushAsync(new EditPlaylist(selectedPLaylist));
         }
     }
 }
Ejemplo n.º 19
0
        public static Job ConfigureRenderingJob(IPlayList playlist, Gtk.Widget parent)
        {
            VideoEditionProperties vep;
            Job job = null;
            int response;

            vep = new VideoEditionProperties();
            vep.TransientFor = (Gtk.Window)parent.Toplevel;
            response         = vep.Run();
            while (response == (int)ResponseType.Ok && vep.EncodingSettings.OutputFile == "")
            {
                MessagePopup.PopupMessage(parent, MessageType.Warning,
                                          Catalog.GetString("Please, select a video file."));
                response = vep.Run();
            }
            if (response == (int)ResponseType.Ok)
            {
                job = new Job(playlist, vep.EncodingSettings, vep.EnableAudio, vep.TitleOverlay);
            }
            vep.Destroy();
            return(job);
        }
Ejemplo n.º 20
0
        public PlaylistView()
        {
            PlayList = new ObservableCollection <IPlayList>();
            InitializeComponent();

            //Create a working playlist before setting the data
            IPlayList playList = environmentFactory.CreateEmptyPlayList("Hardstyle");

            playList.AddTrack(environmentFactory.CreateTrack("Unity (Original Mix)", "2 Best Enemies", "Music/2 Best Enemies - Unity (Original Mix).mp3"));
            playList.AddTrack(environmentFactory.CreateTrack("Marked For Life", "A-Lusion", "Music/A-Lusion - Marked For Life.mp3"));
            playList.AddTrack(environmentFactory.CreateTrack("Kick My Brain", "Acti & Darook MC", "Music/Acti & Darook MC - Kick My Brain.mp3"));
            playList.AddTrack(environmentFactory.CreateTrack("One I Love", "Activator", "Music/Activator - One I Love.mp3"));
            playList.AddTrack(environmentFactory.CreateTrack("Supersonic Bass", "Activator", "Music/Activator - Supersonic Bass.mp3"));
            playList.AddTrack(environmentFactory.CreateTrack("Atrocious (Original Mix)", "Alpha2 & Wildstylez", "Music/Alpha2 & Wildstylez - Atrocious (Original Mix).mp3"));
            playList.AddTrack(environmentFactory.CreateTrack("Feel Good (Gentalica Remix)", "Alphaverb", "Music/Alphaverb - Feel Good (Gentalica Remix).mp3"));
            playList.AddTrack(environmentFactory.CreateTrack("Rockin da Rework (Extended Mix)", "Alphaverb", "Music/Alphaverb - Rockin da Rework (Extended Mix).mp3"));
            playList.AddTrack(environmentFactory.CreateTrack("The Otherside  (Extended Album Mix)", "Alphaverb", "Music/Alphaverb - The Otherside  (Extended Album Mix).mp3"));
            playList.AddTrack(environmentFactory.CreateTrack("Thunderstyle (Remastered Club Mix)", "Alphaverb", "Music/Alphaverb - Thunderstyle (Remastered Club Mix).mp3"));
            playList.AddTrack(environmentFactory.CreateTrack("Rock the Dancefloor", "Ambassador Inc", "Music/Ambassador Inc - Rock the Dancefloor.mp3"));
            playList.AddTrack(environmentFactory.CreateTrack("Silence", "Ambassador Inc", "Music/Ambassador Inc - Silence.mp3"));
            playList.AddTrack(environmentFactory.CreateTrack("The Hardstyle Nation", "Ambassador Inc", "Music/Ambassador Inc - The Hardstyle Nation.mp3"));
            playList.AddTrack(environmentFactory.CreateTrack("Cause & Effect (Original Mix)", "Anderson T", "Music/Anderson T  - Cause & Effect (Original Mix).mp3"));
            playList.AddTrack(environmentFactory.CreateTrack("Rebellion", "B-Twinz", "Music/B-Twinz - Rebellion.mp3"));
            playList.AddTrack(environmentFactory.CreateTrack("Real Street Shit (Original Mix)", "Brian NRG", "Music/Brian NRG - Real Street Shit (Original Mix).mp3"));
            playList.AddTrack(environmentFactory.CreateTrack("Club Bizarre (Headhunterz & Noisecontrollers Remix)", "Brooklyn Bounce", "Music/Brooklyn Bounce - Club Bizarre (Headhunterz & Noisecontrollers Remix).mp3"));
            playList.AddTrack(environmentFactory.CreateTrack("Heavyweight", "Catatonic Overload", "Music/Catatonic Overload  - Heavyweight.mp3"));
            playList.AddTrack(environmentFactory.CreateTrack("Paralyzed", "Catatonic Overload", "Music/Catatonic Overload  - Paralyzed.mp3"));
            PlayList.Add(playList);

            //Generate static and temporary playlists for testing
            PlayList.Add(environmentFactory.CreateEmptyPlayList("First"));
            PlayList.Add(environmentFactory.CreateEmptyPlayList("Second"));
            PlayList.Add(environmentFactory.CreateEmptyPlayList("Third"));
            PlayList.Add(environmentFactory.CreateEmptyPlayList("Forth"));
            PlayList.Add(environmentFactory.CreateEmptyPlayList("Fifth"));
        }
Ejemplo n.º 21
0
 public SongPlayer(string name, IPlayList playList)
 {
     Name     = name;
     PlayList = playList;
 }
Ejemplo n.º 22
0
        public Job ConfigureRenderingJob(IPlayList playlist)
        {
            VideoEditionProperties vep;
            Job job = null;
            int response;

            if (playlist.Count == 0) {
                WarningMessage(Catalog.GetString("The playlist you want to render is empty."));
                return null;
            }

            vep = new VideoEditionProperties();
            vep.TransientFor = mainWindow as Gtk.Window;
            response = vep.Run();
            while(response == (int)ResponseType.Ok && vep.EncodingSettings.OutputFile == "") {
                WarningMessage(Catalog.GetString("Please, select a video file."));
                response=vep.Run();
            }
            if(response ==(int)ResponseType.Ok)
                job = new Job(playlist, vep.EncodingSettings, vep.EnableAudio, vep.TitleOverlay);
            vep.Destroy();
            return job;
        }
Ejemplo n.º 23
0
 private void EmitRenderPlaylist(IPlayList playlist)
 {
     if (RenderPlaylistEvent != null)
         RenderPlaylistEvent(playlist);
 }
Ejemplo n.º 24
0
 ListStore GetModel(IPlayList playlist)
 {
     ListStore listStore = new ListStore(typeof(PlayListPlay));
     foreach(PlayListPlay plNode in playlist) {
         listStore.AppendValues(plNode);
     }
     return listStore;
 }
Ejemplo n.º 25
0
 public void Load(IPlayList playlist)
 {
     this.playlist = playlist;
     label1.Visible = false;
     newvideobutton.Show();
     playlisttreeview1.PlayList = playlist;
     playlisttreeview1.Sensitive = true;
     savebutton.Sensitive = true;
     Model = GetModel(playlist);
 }
Ejemplo n.º 26
0
 public PlayListController()
 {
     _utils = PlayListLocator.GetLastSearch();
     _playlist = PlayListLocator.Get();
 }
 private void PlayPlayListBody(IPlayList plist)
 {
     if (plist == null)
         return;
     IMediaPlayer mp = ModuleManager.GetInstanceOf<IMediaPlayer>("MusicPlayerViewModel");
     if (mp != null)
     {
         foreach (IMedia media in plist.Collection)
             mp.AddMediaToPlayList.Execute(media);
     }
 }
Ejemplo n.º 28
0
 public EditionJob(IPlayList playlist, EncodingSettings encSettings) : base(encSettings)
 {
     Playlist = Cloner.Clone(playlist);
 }
Ejemplo n.º 29
0
        public void SelectPlayList(IPlayList playList)
        {
            playlist = playList;

            PrepareForPlayback(playlist.NextTrack());
        }
Ejemplo n.º 30
0
 public override IMediaPlayer CreateMediaPlayer(IFileService fileService, IPlayList playList)
 {
     return(new DroidMediaPlayer(playList, fileService));
 }
Ejemplo n.º 31
0
 protected virtual void OnRenderPlaylistEvent(IPlayList playlist)
 {
     Job job = guiToolkit.ConfigureRenderingJob(playlist);
     if (job != null)
         videoRenderer.AddJob(job);
 }
Ejemplo n.º 32
0
 /// <summary>
 /// Selects a given playlist for the music player to play
 /// </summary>
 /// <param name="playList">the playlist to select</param>
 private void SelectPlayList(IPlayList playList)
 {
     mediaPlayer.SelectPlayList(playList);
 }
Ejemplo n.º 33
0
 public abstract IMediaPlayer CreateMediaPlayer(IFileService fileService, IPlayList playList);