Exemplo n.º 1
0
 private void LoadBuffer(IBufferIO IO, String fileName)
 {
     byte[] fileBuffer = default(byte[]);
     using (StreamReader sr = new StreamReader(Assets.Open(fileName + ".ogg")))
     {
         using (var memstream = new MemoryStream())
         {
             sr.BaseStream.CopyTo(memstream);
             fileBuffer = memstream.ToArray();
             IO.AddBuffer(fileName, fileBuffer, fileBuffer.Length);
         }
     }
 }
Exemplo n.º 2
0
        private void LoadAssetBuffers()
        {
            IBufferIO IO = Demo.Xamarin.Forms.Global.Yse.BufferIO;

            LoadBuffer(IO, "contact");
            LoadBuffer(IO, "countdown");
            LoadBuffer(IO, "drone");
            LoadBuffer(IO, "flies");
            LoadBuffer(IO, "g");
            LoadBuffer(IO, "kick");
            LoadBuffer(IO, "my2chords");
            LoadBuffer(IO, "pulse1");
            LoadBuffer(IO, "snare");

            IO.Active = true;
        }