是否可以使用Unity3d构建VST?
看起来有可能统一建立音频应用程序。
但我想知道一个DLL是否可以作为一个统一的应用程序? 是否有可能以某种方式将VST SDK与最终版本集成?
Is it possible to build a VST with Unity3d?
It does seem possible to build Audio applications in unity.
But Im wondering whether a DLL can be built as a unityapp? Is it possible to integrate the VST sdk somehow with the final build?
最满意答案
Unity可以在大多数架构上使用本机插件。 看来VST是一个本地的Windows DLL,你可以用DllImport运行这些。
在Unity中,所有音频都存储在音频剪辑中 ,您可以使用创建 , 设置和获取修改其数据。 您还可以将脚本挂接到编辑器中的音频导入,以便使用AssetPostprocessor.OnPostprocessAudio加载时更改它。
所以你必须使用VST滤波器来做一些AudioClip到AudioClip滤波器。
Unity的一个建议 - 精确计时很困难,因为一切都与主循环相关联,并且它随着显示器刷新频率运行(理想情况下)。 如果你想要更多的实时,你需要把自己的线程放在后台 - 它确实与网络上的常见建议相反,只记得在Unity中几乎没有线程安全,所以要更新游戏状态或AudioClips,你需要在游戏循环中做到这一点。
Unity can use native plugins on most architectures. It seems VST is a native windows dll, you can run these with DllImport.
In Unity all audio is stored in AudioClips, you can modify their data using Create, Set and Get. You can also hook your script to audio importing in the editor, so you change it on load with AssetPostprocessor.OnPostprocessAudio.
So you would have to do some kind of a AudioClip to AudioClip filter using VST filters.
One advice with Unity - precise timing is hard as everything is tied to the main gameloop and it runs (ideally) with the frequency of your monitor refresh. If you want some more real time, you need to put your own threads in the background - it does work contrary to common advice on the web, just remember that almost nothing is thread safe in Unity, so to update the game state or AudioClips, you need to do that back in the game loop.
更多推荐
发布评论