public static void ProcessProvider(NAudio.Wave.ISampleProvider provider, string sourceName) { if (provider == null) return; float[] buffer = new float[1024]; bool bContinue = true; int sampleRate = provider.WaveFormat.SampleRate; Decoders.MDC1200 mdc = new Decoders.MDC1200(sampleRate, MDCDelegate, sourceName); //Decoders.STAR star = new Decoders.STAR(sampleRate, null, RadioLog.AudioProcessing.Decoders.STAR.star_format.star_format_1_16383); while (bContinue) { int iCnt = provider.Read(buffer, 0, buffer.Length); bContinue = iCnt > 0; if (bContinue) { mdc.ProcessSamples(buffer, iCnt, true); //star.star_decoder_process_samples(buffer, iCnt); } } }
public static void ProcessProvider(NAudio.Wave.ISampleProvider provider, string sourceName) { if (provider == null) { return; } float[] buffer = new float[1024]; bool bContinue = true; int sampleRate = provider.WaveFormat.SampleRate; Decoders.MDC1200 mdc = new Decoders.MDC1200(sampleRate, MDCDelegate, sourceName); //Decoders.STAR star = new Decoders.STAR(sampleRate, null, RadioLog.AudioProcessing.Decoders.STAR.star_format.star_format_1_16383); while (bContinue) { int iCnt = provider.Read(buffer, 0, buffer.Length); bContinue = iCnt > 0; if (bContinue) { mdc.ProcessSamples(buffer, iCnt, true); //star.star_decoder_process_samples(buffer, iCnt); } } }
private static void MDCDelegate(Decoders.MDC1200 decoder, RadioLog.Common.SignalCode sigCode, int frameCount, byte op, byte arg, ushort unitID, byte extra0, byte extra1, byte extra2, byte extra3, string opMsg) { // }