As shown in the code below, I tried to use AudioFileReader to read the file to determine whether it was an audio file by whether it threw an exception. However, when I used it to read the zip file, I was surprised to find that it threw no exception.
public static bool TryGetAudioInfo(string path, [NotNullWhen(true)] out AudioInfo audioInfo)
{
audioInfo = new AudioInfo();
try
{
using (var reader = new AudioFileReader(path))
{
audioInfo.duration = reader.TotalTime.TotalSeconds;
return true;
}
}
catch
{
return false;
}
}
As shown in the code below, I tried to use AudioFileReader to read the file to determine whether it was an audio file by whether it threw an exception. However, when I used it to read the zip file, I was surprised to find that it threw no exception.
OpenSVIP4TuneLab-v1.0.0.zip
When I tried to debug it, I got this:
NAudio version: 2.2.1