예제 #1
0
        public override unsafe void Replace(string fileName)
        {
            if (fileName.EndsWith(".wav"))
            {
                using (BrstmConverterDialog dlg = new BrstmConverterDialog())
                {
                    dlg.Type        = 1;
                    dlg.AudioSource = fileName;
                    if (dlg.ShowDialog(null) == DialogResult.OK)
                    {
                        ReplaceRaw(dlg.AudioData);
                    }
                }
            }
            else
            {
                base.Replace(fileName);
            }

            Init(WorkingUncompressed.Address + Info._dataLocation,
                 (int)(WorkingUncompressed.Length - Info._dataLocation), (WaveInfo *)WorkingUncompressed.Address);

            //Cut out the audio samples from the imported data
            SetSizeInternal((int)Info._dataLocation);

            UpdateCurrentControl();
            SignalPropertyChange();
            Parent.Parent.SignalPropertyChange();
            if (RSARNode != null)
            {
                RSARNode.SignalPropertyChange();
            }
        }
        public override unsafe void Replace(string fileName)
        {
            if (fileName.EndsWith(".wav"))
            {
                using (BrstmConverterDialog dlg = new BrstmConverterDialog())
                {
                    dlg.Type        = 2;
                    dlg.AudioSource = fileName;
                    if (dlg.ShowDialog(null) == DialogResult.OK)
                    {
                        ReplaceRaw(dlg.AudioData);
                    }
                }
            }
            else
            {
                base.Replace(fileName);
            }

            //Init(Header->Data->Data, Header->Data->_header._length, &Header->Info->_info);

            UpdateCurrentControl();
            SignalPropertyChange();
            Parent.Parent.SignalPropertyChange();
            if (RSARNode != null)
            {
                RSARNode.SignalPropertyChange();
            }
        }