public override AudioProperties GetAudioProperties() { using (var ft = new FlacTools(File.FullName)) { var ap = new AudioProperties { Duration = ft.GetDuration().TotalMilliseconds, BitsPerSample = ft.GetBitsPerSample(), SampleRate = (int)ft.StreamInfo.SampleRateHz, Mode = ft.StreamInfo.Channels == 1 ? ChannelMode.Mono : ChannelMode.Stereo }; return(ap); } }
public override AudioProperties GetAudioProperties() { var mt = new Mp3Tools(File.FullName); var ap = new AudioProperties { Duration = mt.Duration.TotalMilliseconds, AverageBitRate = mt.AverageBitRate, MaximumBitRate = mt.MaximumBitRate, MinimumBitRate = mt.MinimumBitRate, BitsPerSample = mt.BitsPerSample, SampleRate = mt.SampleRate, Mode = mt.Channels == 1 ? ChannelMode.Mono : ChannelMode.Stereo }; return(ap); }