public SXXEditor(StandardUI host, SNDFile datafile) { InitializeComponent(); this.datafile = datafile; this.host = host; Text = string.Format("{0} - Sound Editor", datafile.filename); }
public ReplaceSoundTransaction(SNDFile sndFile, SoundCache cache, int id, string name, byte[] data) : base("Replace sound") { this.sndFile = sndFile; this.id = id; this.name = name; this.data = data; this.cache = cache; }
public SXXEditor(StandardUI host, SNDFile datafile, SoundCache cache, string FileName) { InitializeComponent(); this.datafile = datafile; this.host = host; this.cache = cache; this.fileName = FileName; Text = string.Format("{0} - Sound Editor", FileName); }
/// <summary> /// Helper function to create a sound cache from a given data file. /// </summary> /// <param name="datafile">The datafile to load from. Must have a valid stream.</param> /// <returns>The sound cache with the sound data.</returns> public static SoundCache CreateCacheFromFile(SNDFile datafile) { SoundCache cache = new SoundCache(); for (int i = 0; i < datafile.Sounds.Count; i++) { cache.CacheSound(datafile.LoadSound(i)); } return(cache); }
public SoundPanel(TransactionManager transactionManager, int tabPage, EditorHAMFile datafile, SNDFile soundFile) { InitializeComponent(); this.transactionManager = transactionManager; this.tabPage = tabPage; this.datafile = datafile; SoundIDComboBox.Items.Clear(); SoundIDComboBox.Items.Add("None"); //TODO: This is slow, but is only done once for now. Should be fixed, though. foreach (SoundData sound in soundFile.Sounds) { SoundIDComboBox.Items.Add(sound.Name); } }