2013-04-27 1 views

답변

1

하는 코드에 따라 참조 :

Trim an MP3 Programatically

:

string nMP3Folder = "FOLDER PATH"; 
string nMP3SourceFilename = "SOURCE MP3 FILENAME"; 
string nMP3OutputFilename = "YOUR OUTPUT MP3 FILENAME"; 

using (Mp3FileReader rdr = new Mp3FileReader(nMP3Folder + nMP3SourceFilename)) 
{ 
    int count = 1; 
    Mp3Frame objmp3Frame = reader.ReadNextFrame(); 
    System.IO.FileStream _fs = new System.IO.FileStream(nMP3Folder + nMP3OutputFilename, System.IO.FileMode.Create, System.IO.FileAccess.Write); 

    while (objmp3Frame != null) 
    { 
     if (count > 500) //retrieve a sample of 500 frames 
      return; 

     _fs.Write(objmp3Frame.RawData, 0, objmp3Frame.RawData.Length); 
     count = count + 1; 
     objmp3Frame = rdr.ReadNextFrame(); 
    } 

    _fs.Close(); 
} 

은 또한 더 많은 링크를 얻기 위해 질문을 다음 참조

관련 문제