2012-01-30 253 views
1

有什麼方法可以知道Bass音頻庫(如WAV/AIFF/MP3/MP2/MP1/OGG)是否支持文件擴展名?我想編寫一個函數,如:BASS音頻庫支持的音樂文件

Public void Play(string File) 
{ 
    if(IsSupportedFile(file) 
    { 

     // Add the appropriate code to play the file 
    } 

} 
Public bool isSupported(string File) 
{ 
    // Should return true if the file extension is supported by bass audio and add ons 
} 

回答

3

試試這個:

Public bool isSupported(string File) 
{ 
    return Un4seen.Bass.Utils.BASSAddOnIsFileSupported(Nothing, file); 
} 
相關問題