Ejemplo n.º 1
0
 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);
 }
Ejemplo n.º 2
0
        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));
        }
Ejemplo n.º 3
0
 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);
 }
Ejemplo n.º 4
0
 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);
 }