unsafe static RtlDevice() { RtlDevice._lutBuffer = UnsafeBuffer.Create(256, 4); RtlDevice._rtlCallback = RtlDevice.RtlSdrSamplesAvailable; RtlDevice._readLength = (uint)Utils.GetIntSetting("RTLBufferLength", 16384); RtlDevice._lutPtr = (float *)(void *)RtlDevice._lutBuffer; for (int i = 0; i < 256; i++) { RtlDevice._lutPtr[i] = (float)(i - 128) * 0.007874016f; } }
public static extern int rtlsdr_read_async(IntPtr dev, RtlSdrReadAsyncDelegate cb, IntPtr ctx, uint bufNum, uint bufLen);
public static extern int rtlsdr_wait_async(IntPtr dev, RtlSdrReadAsyncDelegate cb, IntPtr ctx);