是的,这是这个问题的完全重复,但给出并接受的答案链接对我不起作用。它返回不正确的值(一个2分钟的MP3将被列为1'30,3分钟为2'20),没有明显的模式。
所以再来一次:如何使用C#获取MP3的长度?
或者
我在MP3Header类中做错了什么:
MP3Header mp3hdr = new MP3Header();
bool boolIsMP3 = mp3hdr.ReadMP3Information("1.mp3");
if(boolIsMP3)
Response.Write(mp3hdr.intLength);