/// <summary> /// Initializes a new instance of the <see cref="OptimFrog"/> class. /// </summary> /// <param name="path">The full path of the file.</param> public OptimFrog(string path) { using (FileStream fs = File.Open(path, FileMode.Open, FileAccess.Read, FileShare.Read)) { fs.Position = 31; RiffWave wav = new RiffWave(fs); _channels = wav.Channels; _frequency = wav.Frequency; _totalSeconds = wav.TotalSeconds; _bitrate = (fs.Length / 125.0m) / _totalSeconds; } }