public static AudioBuffer ReadAllSamples(string path, Stream IO) { WAVReader reader = new WAVReader(path, IO); AudioBuffer buff = new AudioBuffer(reader, (int)reader.Length); reader.Read(buff, -1); if (reader.Remaining != 0) { throw new Exception("couldn't read the whole file"); } reader.Close(); return(buff); }
public int Read(AudioBuffer buff, int maxLength) { Initialize(); return(rdr.Read(buff, maxLength)); }