Ejemplo n.º 1
0
 private static void WriteGenerator(string path, IGenerator generator)
 {
     float[] buffer = new float[1024];
     using (var s = new FileStream(path, FileMode.Create))
         using (var w = new WaveWriter(s, 44100))
         {
             bool done;
             do
             {
                 done = generator.Render(buffer);
                 w.Write(buffer);
             } while (!done);
         }
 }
Ejemplo n.º 2
0
 private static void WriteGenerator(string path, IGenerator generator)
 {
     float[] buffer = new float[1024];
     using (var s = new FileStream(path, FileMode.Create))
     using (var w = new WaveWriter(s, 44100))
     {
         bool done;
         do
         {
             done = generator.Render(buffer);
             w.Write(buffer);
         } while (!done);
     }
 }