怎么样读取一个mp3 文件的比特率和播放时间的信息?
给出完整代码立即结贴

解决方案 »

  1.   

    Em,there is a way to get it. First you need add the mediaplayer class (or other media player class),here is a example used MediaPlayer:add reference
    click panel of COM at the windows of Add Reference
    you can find Microsoft Media Player here, select it, ok, then you can see a new reference named WMPLib at your Solution Explorer.
    now take attention to Code Editor and add this code to your function://define a new WindowsMediaPlayerClass
    WMPLib.WindowsMediaPlayerClass p = new WMPLib.WindowsMediaPlayerClass();
    //add a new media to your mediapalyer
    p.add("C:\\yourmedia");
    //now play it
    p.play();
    //the rate of media
    p.rate;
    //add other code here
    //if you want do other thing please turn to the introduction of MediaPlayer