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); } } }