3行代码播放wav 'API声明 Private Declare Function sndPlaySound Lib "winmm.dll" Alias "sndPlaySoundA" _ (ByVal lpszSoundName As String, ByVal uFlags As Long) As Long .................
这是一个用C#编写的Unity资源包,可以录制麦克风的语音输入,转换成MP3和WAV格式,还可以播放本地的MP3和WAV格式的音频文件,导入后如果报错,请修改.NET API File => Build Settings => Player Settings => (in Inspector) Other Settings => Optimization => Api Compatibility Level : .Net 2.0 里边有使用说明。