private void ProcessBuffer(int count) { //AM demodulate and offset osc.Mix(bufferPtr, count); amDemod.Demodulate(bufferPtr, bufferPtr, count); //Filter filter.Process(bufferPtr, count); //Get pixels for (int i = 0; i < count; i++) { if (resampleOffset >= 1) { ProcessSample(resampleMax); resampleMax = 0; resampleOffset -= 1; } resampleOffset += symbolsPerSample; resampleMax = Math.Max(resampleMax, bufferPtr[i]); } }
public unsafe int Demodulate(Complex *iq, float *audio, int count) { am.Demodulate(iq, audio, count); snr.AddSamples(audio, count); return(count); }