public static XtAttributes GetSampleAttributes(XtSample sample) { XtAttributes attributes = new XtAttributes(); XtNative.XtAudioGetSampleAttributes(sample, attributes); return(attributes); }
static void OnAggregate(XtStream stream, object input, object output, int frames, double time, ulong position, bool timeValid, ulong error, object user) { XtFormat format = stream.GetFormat(); XtAttributes attrs = XtAudio.GetSampleAttributes(format.mix.sample); if (frames > 0) { Buffer.BlockCopy((Array)input, 0, (Array)output, 0, frames * format.inputs * attrs.size); } }
internal XtSafeBuffer(XtStream stream, bool interleaved) { _stream = stream; _interleaved = interleaved; _format = stream.GetFormat(); _inputs = _format.channels.inputs; _outputs = _format.channels.outputs; _attrs = XtAudio.GetSampleAttributes(_format.mix.sample); _input = CreateBuffer(_inputs); _output = CreateBuffer(_outputs); }
internal static extern void XtAudioGetSampleAttributes(XtSample sample, [In, Out] XtAttributes attributes);
internal static extern IntPtr XtPrintAttributesToString(XtAttributes attributes);