public int DecompressFrame(NAudio.Wave.Mp3Frame frame, byte[] buffer, int offset) { _frame.WrappedFrame = frame; var dst = MemoryMarshal.Cast <byte, float>(buffer.AsSpan(offset)); return(_decoder.DecodeFrame(_frame, dst) * sizeof(float)); }
public int DecompressFrame(NAudio.Wave.Mp3Frame frame, byte[] dest, int destOffset) { _frame.WrappedFrame = frame; return(_decoder.DecodeFrame(_frame, dest, destOffset)); }