I'm task with analyzing a wav audio file (filtering, FFT, etc.) in C#. Currently I'm stuck trying to properly convert the bytes to double in order to plot the audio signal of the waveform with scottplot, I have tried using Naudio library but didn't find any success with reading the audio data and plotting it, ended up corrupting my project. the code below is where I read the wav byte into an array and convert it to a double array to plot the signal using scottplot which is not working, I'm using windows forms app(.NET core)
byte[] wavData = File.ReadAllBytes(@"C:\Users\me\Documents\africa-song.wav");
double[] values = new double[wavData.Length / 8];
Buffer.BlockCopy(wavData, 0, values, 0, values.Length * 8);
formsPlot1.plt.PlotSignal(values, 44100);
if there's a better library I can use or a work around to achieve this, would be really appreciated