public void Read <T>(T[] data) { if (data == null) { throw new ArgumentNullException("data"); } Read(data, 0, data.Length * Marshal.SizeOf(typeof(T)) / format.SampleByteSize()); }
public void Data(AudioFormat format, IntPtr buffer, int bytes, Frequency frequency) { int bytesPerSample = format.SampleByteSize(); using (Context.Bind()) AL.BufferData(Id, (ALFormat)format, buffer, bytes / bytesPerSample * bytesPerSample, (int)Math.Round(frequency.InHertz)); this.format = format; }