BASS音频库支持的音乐文件
问题描述:
有什么方法可以知道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
}
答
试试这个:
Public bool isSupported(string File)
{
return Un4seen.Bass.Utils.BASSAddOnIsFileSupported(Nothing, file);
}