Exemplo n.º 1
0
 public static MyInMemoryWaveBank Create(AudioEngine engine, string filename)
 {
     DataStream ds;
     using (FileStream fs = File.OpenRead(filename))
     {
         ds = new DataStream((int)fs.Length, true, true);
         fs.CopyTo(ds);
         ds.Position = 0;
     }
     var result = new MyInMemoryWaveBank(engine, ds);
     result.m_backingStore = ds;
     return result;
 }
Exemplo n.º 2
0
        public static MyInMemoryWaveBank Create(AudioEngine engine, string filename)
        {
            DataStream ds;

            using (FileStream fs = File.OpenRead(filename))
            {
                ds = new DataStream((int)fs.Length, true, true);
                fs.CopyTo(ds);
                ds.Position = 0;
            }
            var result = new MyInMemoryWaveBank(engine, ds);

            result.m_backingStore = ds;
            return(result);
        }