public static Signal FromArray(Array signal, int sampleRate, SampleFormat format = SampleFormat.Format32BitIeeeFloat) { int channels = signal.Rank == 1 ? 1 : signal.GetLength(1); return FromArray(signal, channels, sampleRate, format); }
/// <summary> /// Notifies client about new block of frames. /// </summary> /// /// <param name="frame">New frame's audio.</param> /// protected void OnNewFrame(Array frame) { framesReceived++; if (NewFrame != null) { NewFrame(this, new NewFrameEventArgs(Signal.FromArray(frame, channels, sampleRate, SampleFormat.Format16Bit))); } }