Пример #1
0
 /// <summary>
 /// Constructor.
 /// </summary>
 /// <param name="name"></param>
 /// <param name="directoryToXwb"></param>
 /// <param name="pathToXWB"></param>
 public XACTMusicPack(string directoryToXwb, string pathToXWB)
 {
     this.directory            = directoryToXwb;
     this.XWBPath              = pathToXWB;
     this.songInformation      = new SongSpecifics();
     this.currentCue           = null;
     this.musicPackInformation = MusicPackMetaData.readFromJson(Path.Combine(directoryToXwb, "MusicPackInformation.json"));
     if (this.musicPackInformation == null)
     {
         StardewSymphony.ModMonitor.Log("Error: MusicPackInformation.json not found at: " + directoryToXwb + ". Blank information will be put in place.", StardewModdingAPI.LogLevel.Warn);
         this.musicPackInformation = new MusicPackMetaData("???", "???", "", "0.0.0");
     }
 }
Пример #2
0
        /// <summary>
        /// Constructor.
        /// </summary>
        /// <param name="directoryToMusicPack"></param>
        public WavMusicPack(string directoryToMusicPack)
        {
            this.directory = directoryToMusicPack;
            this.setModDirectoryFromFullDirectory();
            this.songsDirectory       = Path.Combine(this.directory, "Songs");
            this.songInformation      = new SongSpecifics();
            this.musicPackInformation = MusicPackMetaData.readFromJson(Path.Combine(directoryToMusicPack, "MusicPackInformation.json"));

            if (this.musicPackInformation == null)
            {
                StardewSymphony.ModMonitor.Log("Error: MusicPackInformation.json not found at: " + directoryToMusicPack + ". Blank information will be put in place.", StardewModdingAPI.LogLevel.Warn);
                this.musicPackInformation = new MusicPackMetaData("???", "???", "", "0.0.0", "");
            }
            this.loadMusicFiles();
        }
Пример #3
0
        /// <summary>
        /// Constructor.
        /// </summary>
        /// <param name="name"></param>
        /// <param name="directoryToXwb"></param>
        /// <param name="pathToWaveBank"></param>
        /// <param name="pathToSoundBank"></param>
        public XACTMusicPack(string directoryToXwb, string pathToWaveBank, string pathToSoundBank)
        {
            this.directory     = directoryToXwb;
            this.WaveBankPath  = pathToWaveBank;
            this.SoundBankPath = pathToSoundBank;
            this.setModDirectoryFromFullDirectory();
            this.songInformation      = new SongSpecifics();
            this.currentCue           = null;
            this.musicPackInformation = MusicPackMetaData.readFromJson(Path.Combine(directoryToXwb, "MusicPackInformation.json"));
            if (this.musicPackInformation == null)
            {
                StardewSymphony.ModMonitor.Log("Error: MusicPackInformation.json not found at: " + directoryToXwb + ". Blank information will be put in place.", StardewModdingAPI.LogLevel.Warn);
                this.musicPackInformation = new MusicPackMetaData("???", "???", "", "0.0.0", "");
            }

            this.WaveBank  = new WaveBank(Game1.audioEngine, this.WaveBankPath);
            this.SoundBank = new SoundBank(Game1.audioEngine, this.SoundBankPath);
            this.loadMusicFiles();
        }
Пример #4
0
        /// <summary>
        /// Constructor.
        /// </summary>
        /// <param name="directoryToMusicPack"></param>
        public WavMusicPack(string directoryToMusicPack, bool Loop = false)
        {
            this.directory = directoryToMusicPack;
            this.setModDirectoryFromFullDirectory();
            this.songsDirectory       = Path.Combine(this.directory, "Songs");
            this.songInformation      = new SongSpecifics();
            this.musicPackInformation = MusicPackMetaData.readFromJson(directoryToMusicPack);
            this.loop   = Loop;
            this.sounds = new Dictionary <string, SoundEffectInstance>();

            /*
             * if (this.musicPackInformation == null)
             * {
             *  //StardewSymphony.ModMonitor.Log("Error: MusicPackInformation.json not found at: " + directoryToMusicPack + ". Blank information will be put in place.", StardewModdingAPI.LogLevel.Warn);
             *  //this.musicPackInformation = new MusicPackMetaData("???", "???", "", "0.0.0","");
             * }
             */
            //StardewSymphony.ModMonitor.Log(this.musicPackInformation.name.ToString());
            this.loadMusicFiles();
        }