public override bool Equals(object obj) { WaveFormat waveFormat = obj as WaveFormat; return(waveFormat != null && (this.waveFormatTag == waveFormat.waveFormatTag && this.channels == waveFormat.channels && this.sampleRate == waveFormat.sampleRate && this.averageBytesPerSecond == waveFormat.averageBytesPerSecond && this.blockAlign == waveFormat.blockAlign) && this.bitsPerSample == waveFormat.bitsPerSample); }
private static long BytesToNsPosition(int bytes, WaveFormat waveFormat) { long nsPosition = (10000000L * bytes) / waveFormat.AverageBytesPerSecond; return(nsPosition); }
public static WaveFormat CreateMuLawFormat(int sampleRate, int channels) { return(WaveFormat.CreateCustomFormat(WaveFormatEncoding.MuLaw, sampleRate, channels, sampleRate * channels, channels, 8)); }
public SilenceProvider(WaveFormat wf) { this.WaveFormat = wf; }