Hello. Tell me, please, I plotted a wav sound signal in the time domain (which is presented below), but instead of seconds, samples are displayed, how can you count the samples as seconds?
I wrote a code that allows you to get the sampling rate from a wav file, and then I don’t understand how to translate samples in seconds
`// Метод, получающий частоту дискретизации public void GetSampleRate(string waveFile) { //Читаем данные using (var fs = new FileStream(waveFile, FileMode.Open, FileAccess.Read)) { using (var br = new BinaryReader(fs)) { RiffId = br.ReadBytes(4); Size = br.ReadUInt32(); WavId = br.ReadBytes(4); FmtId = br.ReadBytes(4); FmtSize = br.ReadUInt32(); Format = br.ReadUInt16(); Channels = br.ReadUInt16(); SampleRate = br.ReadUInt32(); BytePerSec = br.ReadUInt32(); BlockSize = br.ReadUInt16(); Bit = br.ReadUInt16(); DataId = br.ReadBytes(4); DataSize = br.ReadUInt32(); // Читаем канал ReadChannel(br); } } } ` 
nSamplesPerSecfield in theWAVEFORMATstructure: msdn.microsoft.com/en-us/library/windows/desktop/… - user239133