public void SetPlayer(string aFilePath)
        {
            bool  lIsMute = player.IsMute;
            bool  lIsLoop = player.IsLoop;
            float lVolume = player.Volume;

            title  = Path.GetFileNameWithoutExtension(aFilePath);
            player = ConstructorCollection.ConstructPlayer(aFilePath);

            player.IsMute = lIsMute;
            player.IsLoop = lIsLoop;
            player.Volume = lVolume;
        }
Beispiel #2
0
        private void PlayMusic(string aFilePath)
        {
            if (componentPlaylist.musicInformationDictionary.ContainsKey(aFilePath) == true)
            {
                bool  lIsMute = player.IsMute;
                bool  lIsLoop = player.IsLoop;
                float lVolume = player.Volume;

                player = ConstructorCollection.ConstructPlayer(aFilePath);

                player.IsMute = lIsMute;
                player.IsLoop = lIsLoop;
                player.Volume = lVolume;

                componentLoopEditor.SetPlayer(player, componentPlaylist.musicInformationDictionary[aFilePath]);
                componentLoopPlayer.SetPlayer(player);
                componentLoopSelector.SetPlayMusicInformation(componentPlaylist.musicInformationDictionary[aFilePath]);
            }
            else
            {
                if (componentInputlist.musicInformationDictionary.ContainsKey(aFilePath) == true)
                {
                    IMusic               lMusic = componentInputlist.musicInformationDictionary[aFilePath].music;
                    LoopInformation      lLoop  = componentInputlist.musicInformationDictionary[aFilePath].music.Loop;
                    PlayMusicInformation l      = new PlayMusicInformation(0, false, lMusic, lLoop);

                    bool  lIsMute = player.IsMute;
                    bool  lIsLoop = player.IsLoop;
                    float lVolume = player.Volume;

                    player = ConstructorCollection.ConstructPlayer(aFilePath);

                    player.IsMute = lIsMute;
                    player.IsLoop = lIsLoop;
                    player.Volume = lVolume;

                    componentLoopEditor.SetPlayer(player, l);
                    componentLoopPlayer.SetPlayer(player);
                    componentLoopSelector.SetPlayMusicInformation(l);
                }
            }

            componentLoopEditor.UpdateMesh();
        }
Beispiel #3
0
        public void SetPlayer(string aFilePath, PlayMusicInformation aMusicInformation)
        {
            bool  lIsMute = player.IsMute;
            bool  lIsLoop = player.IsLoop;
            float lVolume = player.Volume;

            title  = Path.GetFileNameWithoutExtension(aFilePath);
            player = ConstructorCollection.ConstructPlayer(aFilePath);

            if (aMusicInformation.isSelected == true)
            {
                SetLoop(aMusicInformation.loopPoint);
            }

            player.IsMute = lIsMute;
            player.IsLoop = lIsLoop;
            player.Volume = lVolume;

            playMusicInformation = aMusicInformation;
            componentLoopSelector.SetPlayMusicInformation(aMusicInformation);
        }