我将Salzsa与Unity3D结合使用,并制作了config.ini文件用于其不同的属性。我正在寻找代码来选择音频播放设备,因为我有多个扬声器/播放设备。使用audiostream,可以将播放设备设置为audiostream.setoutput(0)(要运行的任何音频设备为0或1)。我不知道如何用salsa函数或统一应用程序简单地做到这一点。
// get the audio file from url //
WWW www = new WWW (fileName);
// this clip is an audio file
AudioClip audioClip = www.GetAudioClip (false, false, AudioType.WAV);
while(audioClip.loadState != AudioDataLoadState.Loaded)
yield return www;
// set and play the clip //
salsa.SetAudioClip (audioClip);
salsa.Play ();