public BSpeech(uint fnum) : base(fnum, ResView.SoundView.get()) { byte[] snd = new byte[getData().Length]; Array.Copy(getData(), 0, snd, 0, snd.Length); snd[0] = snd[1] = snd[12] = snd[13] = 0x7F; wf = new WavFile(snd); }
public override bool import(string filename) { FileStream fs = new FileStream(filename, FileMode.Open); WavFile w = new WavFile(); bool res = w.loadFromStream(fs); fs.Close(); if (!res) { throw new Exception("Bad wave file"); } if (!w.checkFormat(WavFile.getFormat())) { throw new Exception("Bad wave file format"); } byte[] raw = w.rawBytes(); raw[0] = 0x81; raw[1] = 0; return(SkyDisk.get().importFile((int)filenum, raw)); }
public override bool import(string filename) { FileStream fs = new FileStream(filename, FileMode.Open); WavFile w = new WavFile(); bool res = w.loadFromStream(fs); fs.Close(); if (!res) throw new Exception("Bad wave file"); if (!w.checkFormat(WavFile.getFormat())) throw new Exception("Bad wave file format"); byte[] raw=w.rawBytes(); raw[0] = 0x81; raw[1] = 0; return SkyDisk.get().importFile((int)filenum, raw); }
public BSpeech(uint fnum) : base(fnum, ResView.SoundView.get()) { byte[] snd = new byte[getData().Length]; Array.Copy(getData(), 0, snd, 0, snd.Length); snd[0] = snd[1] = snd[12] = snd[13] = 0x7F; wf = new WavFile(snd); }