Ok, I figured out the Audio Level portion. I replaced a few lines in my Play method from this:
_WaveOut = new NAudio.Wave.WaveOut(NAudio.Wave.WaveCallbackInfo.FunctionCallback());
_WaveOut.Init(_WaveStream);
_WaveOut.Play();
to this:
_WaveOut = new NAudio.Wave.WaveOut(NAudio.Wave.WaveCallbackInfo.FunctionCallback());
NAudio.Wave.SampleProviders.SampleChannel Channel = new NAudio.Wave.SampleProviders.SampleChannel(_WaveStream);
NAudio.Wave.SampleProviders.MeteringSampleProvider Meter = new NAudio.Wave.SampleProviders.MeteringSampleProvider(Channel);
Meter.StreamVolume += (s, e) => Console.WriteLine("{0} - {1}", e.MaxSampleValues[0], e.MaxSampleValues[1]);
_WaveOut.Init(new NAudio.Wave.SampleProviders.SampleToWaveProvider(Meter));
_WaveOut.Play();
and it plays the stream and outputs the values. :)
<now to the volume feature>
_WaveOut = new NAudio.Wave.WaveOut(NAudio.Wave.WaveCallbackInfo.FunctionCallback());
_WaveOut.Init(_WaveStream);
_WaveOut.Play();
to this:
_WaveOut = new NAudio.Wave.WaveOut(NAudio.Wave.WaveCallbackInfo.FunctionCallback());
NAudio.Wave.SampleProviders.SampleChannel Channel = new NAudio.Wave.SampleProviders.SampleChannel(_WaveStream);
NAudio.Wave.SampleProviders.MeteringSampleProvider Meter = new NAudio.Wave.SampleProviders.MeteringSampleProvider(Channel);
Meter.StreamVolume += (s, e) => Console.WriteLine("{0} - {1}", e.MaxSampleValues[0], e.MaxSampleValues[1]);
_WaveOut.Init(new NAudio.Wave.SampleProviders.SampleToWaveProvider(Meter));
_WaveOut.Play();
and it plays the stream and outputs the values. :)
<now to the volume feature>