public virtual void VisitConstructorCollection(ConstructorCollection ctors)
 {
     foreach (MethodDefinition ctor in ctors)
     {
         VisitConstructor(ctor);
     }
 }
 public override void VisitConstructorCollection(ConstructorCollection ctors)
 {
     foreach (MethodDefinition ctor in ctors)
     {
         VisitMethodDefinition(ctor);
     }
 }
Beispiel #3
0
 public override void VisitConstructorCollection(ConstructorCollection ctors)
 {
     for (int i = 0; i < ctors.Count; i++)
     {
         VisitConstructor(ctors[i]);
     }
 }
 public void VisitConstructorCollection(ConstructorCollection ctors)
 {
     foreach (MethodDefinition constructor in ctors)
     {
         AppendNode(constructor.DeclaringType, constructor, false);
     }
 }
Beispiel #5
0
        public PlayerMidi(string aFilePath)
        {
            FilePath = aFilePath;
            Music    = ConstructorCollection.ConstructMusic(aFilePath);

            sequencer = new MidiSequencer(( MusicMidi )Music, new MidiSynthesizer());

            updatePlayCurrent = sequencer.UpdatePlay;
        }
Beispiel #6
0
        private void UpdateFileList(object sender, FileSystemEventArgs e)
        {
            string[]      lFilePathArray   = PoolFilePath.Get(directoryInfo);
            List <string> lFilePathNewList = new List <string>();

            // Check New File.
            for (int i = 0; i < lFilePathArray.Length; i++)
            {
                string lFilePath       = lFilePathArray[i];
                long   lTimeStampTicks = File.GetLastWriteTime(lFilePath).Ticks;

                if (timeStampTicksDictionary.ContainsKey(lFilePath) == false)
                {
                    timeStampTicksDictionary.Add(lFilePath, lTimeStampTicks);
                    lFilePathNewList.Add(lFilePath);
                }
                else if (lTimeStampTicks != timeStampTicksDictionary[lFilePath])
                {
                    timeStampTicksDictionary[lFilePath] = lTimeStampTicks;
                    lFilePathNewList.Add(lFilePath);
                }
            }

            for (int i = 0; i < lFilePathNewList.Count; i++)
            {
                string lFilePath = lFilePathNewList[i];
                //Logger.BreakDebug( "Input:" + lFilePath );

                if (Path.GetExtension(lFilePath) == ".meta")
                {
                    continue;
                }

                try
                {
                    IMusic lMusic = ConstructorCollection.ConstructMusic(lFilePath);

                    if (lMusic != null)
                    {
                        if (musicInformationDictionary.ContainsKey(lFilePath) == false)
                        {
                            filePathList.Add(lFilePath);
                            musicInformationDictionary.Add(lFilePath, new InputMusicInformation(timeStampTicksDictionary[lFilePath], false, lMusic, 0.0d));
                        }
                        else
                        {
                            musicInformationDictionary[lFilePath] = new InputMusicInformation(timeStampTicksDictionary[lFilePath], false, lMusic, 0.0d);
                        }
                    }
                }
                catch (Exception aExpection)
                {
                    Logger.BreakError("LoopPlaylist Exception:" + aExpection.ToString() + ":" + lFilePath);
                }
            }
        }
 protected AbstractTypeEmitter(TypeBuilder typeBuilder)
 {
     typebuilder      = typeBuilder;
     nested           = new NestedClassCollection();
     methods          = new MethodCollection();
     constructors     = new ConstructorCollection();
     properties       = new PropertiesCollection();
     events           = new EventCollection();
     name2GenericType = new Dictionary <String, GenericTypeParameterBuilder>();
 }
        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 #9
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 #10
0
        private MethodDefinition [] GetConstructors(TypeDefinition type)
        {
            ArrayList list = new ArrayList();

            ConstructorCollection ctors = type.Constructors;            //type.GetConstructors (flags);

            foreach (MethodDefinition constructor in ctors)
            {
                // we're only interested in public or protected members
                if (!MustDocumentMethod(constructor))
                {
                    continue;
                }

                list.Add(constructor);
            }

            return((MethodDefinition [])list.ToArray(typeof(MethodDefinition)));
        }
Beispiel #11
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);
        }
        static MidiGenerator()
        {
            //lSoundfontFile = "Sound/Soundfont/Sfz/Bank/MandolinOrchestra.blst.txt";
            //string lSoundfontFile = "/Users/nagi/Google ドライブ/Soundline/Sfz/BankList/Standard.blst.txt";
            //string lSoundfontFile = "/Users/nagi/Google ドライブ/Soundline/Sfz/BankList/Original.blst.txt";
            //lSoundfontFile = "Sound/Soundfont/gm.dls";
            //lSoundfontFile = "Sound/Soundfont/msgs.sf2";

            //soundcluster = LoaderSoundcluster.Load( UnityEngine.Application.streamingAssetsPath + "/Sound/Soundfont/gm.dls" );
            //soundcluster = LoaderSoundcluster.Load( UnityEngine.Application.streamingAssetsPath + "/Sound/Soundfont/msgs.sf2" );
            //soundcluster = ConstructorCollection.ConstructSoundcluster( UnityEngine.Application.streamingAssetsPath + "/Sound/Soundfont/Sfz/Standard.blst" );

            string lFilePath = "";

            using (FileStream uFileStream = new FileStream(UnityEngine.Application.streamingAssetsPath + "/Sound/Soundfont/Soundfont.txt", FileMode.Open, FileAccess.Read))
            {
                using (StreamReader u = new StreamReader(uFileStream))
                {
                    for (string lLine = u.ReadLine(); lLine != null; lLine = u.ReadLine())
                    {
                        if (lLine != "" && lLine.IndexOf("//") != 0)
                        {
                            if (lLine[0] == '/')
                            {
                                lFilePath = lLine;
                            }
                            else
                            {
                                lFilePath = UnityEngine.Application.streamingAssetsPath + "/Sound/Soundfont/" + lLine;
                            }
                        }
                    }
                }
            }

            soundcluster = ConstructorCollection.ConstructSoundcluster(lFilePath);
        }
 public static void SetSoundcluster(string aPathFile)
 {
     soundcluster = ConstructorCollection.ConstructSoundcluster(aPathFile);
 }
Beispiel #14
0
 public void VisitConstructorCollection(ConstructorCollection ctors)
 {
 }
Beispiel #15
0
 public override void VisitConstructorCollection(ConstructorCollection ctors)
 {
     VisitCollection(ctors);
 }
Beispiel #16
0
        /*
         * public PlayerPcm()
         * {
         *      Volume = 0.5f;
         *      IsMute = false;
         *      IsLoop = true;
         * }
         */

        public PlayerPcm(string aFilePath)
            : this(aFilePath, ( MusicPcm )ConstructorCollection.ConstructMusic(aFilePath))
        {
        }