示例#1
0
        public HRTF(Context context, AudioSettings audioSettings, string sofaFileName)
        {
            var hrtfSettings = new HRTFSettings {
            };

            hrtfSettings.type         = (sofaFileName != null) ? HRTFType.SOFA : HRTFType.Default;
            hrtfSettings.sofaFileName = sofaFileName;

            var status = API.iplHRTFCreate(context.Get(), ref audioSettings, ref hrtfSettings, out mHRTF);

            if (status != Error.Success)
            {
                Debug.LogError(string.Format("Unable to load HRTF: {0}.", hrtfSettings.sofaFileName));
                mHRTF = IntPtr.Zero;
            }
            else
            {
                Debug.Log(string.Format("Loaded HRTF: {0}.", (sofaFileName != null) ? hrtfSettings.sofaFileName : "default"));
            }
        }
示例#2
0
 public static extern Error iplHRTFCreate(IntPtr context, ref AudioSettings audioSettings, ref HRTFSettings hrtfSettings, out IntPtr hrtf);