public void AddFrames(short[] aBuffer, uint nSize) // IntPtr pBuffer, int nSiz short[] aBuffer { EbuR128Error nRes = CppFunction <Functions.wrap_ebur128_add_frames_short>().Invoke(_pState, aBuffer, nSize); if (nRes > 0) { throw new Exception("wrap_ebur128_add_frames_short returns " + nRes + $" [p={_pState}][buf={(aBuffer == null ? "NULL" : "" + aBuffer.Length)}][siz={nSize}]"); } }
public EbuR128(uint nChannels, uint nSamplerate, EbuR128Mode eAnalizeMode) { EbuR128Error nRes = CppFunction <Functions.wrap_ebur128_init>().Invoke(nChannels, nSamplerate, eAnalizeMode, out _pState); if (nRes > 0) { throw new Exception($"wrap_ebur128_init returns {nRes}"); } }
public double GetLufs() { double nRetVal; EbuR128Error nRes = CppFunction <Functions.wrap_ebur128_loudness_global>().Invoke(_pState, out nRetVal); if (nRes > 0) { throw new Exception("wrap_ebur128_loudness_global returns " + nRes); } return(nRetVal); }
public void AddFrames(int[] aBuffer) { //GCHandle cHandle = GCHandle.Alloc(aBuffer, GCHandleType.Pinned); //cHandle.AddrOfPinnedObject() EbuR128Error nRes = CppFunction <Functions.wrap_ebur128_add_frames_int>().Invoke(_pState, aBuffer, (uint)aBuffer.Length); if (nRes > 0) { throw new Exception("wrap_ebur128_add_frames_int returns " + nRes); } }