How to set the 3D related parameters for FMOD Core Api calling resonanceaudio?

Hello everyone! I am a programming enthusiast from China and this is my inaugural visit to this forum. Should there be any shortcomings in my communication, please extend your gracious indulgence.
As the title suggests, I’ve faced a challenge when interfacing with the FMOD Core API’s Resonance audio plugin using C#. My uncertainty lies in properly configuring the 3D positioning parameters such as ‘absolute’ and ‘relative’. The distinction between these two options and the correct protocol for setting them has eluded me, leading to disarray in the placement of source and listener positions.
In addition, establishing the listener position within Resonance has also presented difficulties. The methodology behind setting ‘absolute’ and ‘relative’ positions continues to elude my understanding, plunging me into considerable confusion.
I earnestly seek the community’s guidance to help resolve these challenges. Your assistance would be greatly valued and appreciated. Thank you immensely for your time and consideration.

I researched again and couldn’t find a way to move the real listener, but I can achieve this function by simultaneously moving the positions of all sounds while the real listener is moving. I think this is very troublesome. Did I not find the correct method? Is changing the direction of the listener the same method? Surprisingly, what is the role of absolute position?

您好,

请问你使用的是哪个版本的 FMOD 集成?

不知你使用的是 Unity引擎还是自定义的引擎呢?

请问我可以看一下你用来移动对象的代码片段吗?

不知能否麻烦你详细描述一下在设置absoluterelative位置时所不理解的地方呢?是指在查看相关文档时的说明令你感到困惑吗?

你可以通过 System::set3DListenerAttributes 来单独设置该listener的位置,不知这个是否你在查找的呢?

您好,很高兴您的回复,您使用中文,那我也使用中文了。
我使用的是自定义引擎的版本,也就是那个FMOD Core低级的那个API,并没有使用Studio还有各大游戏引擎的集成。
然后我是想在FMOD中调用Resonanceaudio这个插件来渲染3D声音。
设定它的3D位置不能使用system中的那个函数,而是使用dsp中的SetParameterData来设置3D位置。
而这个函数需要一个struct,这个struct中就有一个绝对字段和一个相对的字段。并且两个字段中都有位置,方向,速度等。
我现在大概弄懂了他们的区别,绝对位置应该是用来设定听者的房间属性的吧。
相对字段应该是用来设定听者和这些声音之间的关系的吧。
如果这样的话,听者每次移动都要设置所有的声音的相对位置和方向。那这样感觉很麻烦,或者是不是我理解错了。
此外,resonanceaudio有三个Plugin,其中Soundfield这个插件我不知道有什么使用价值,用在什么地方,目前就没有使用它。可以的话请指教一下哈哈。
最后再次感谢您的回复!

或者有什么关于这方面的示例代码吗?我看大部分都是关于FMODStudio的。

感谢您提供的所有信息。

我能问一下您是在哪里查找到这些信息的吗?

//创建 Resonance Audio 声源DSP
FMOD.DSP dsp;
system.createDSPByPlugin(PluginHandle + 2, out dsp);

我想确认下,这是您用来附加到sound channel里边的Resonance Audio 声源DSP吗,不知道您是在哪里添加Resonance Audio Listener(听者)的呢?

不好意思,因为Resonance是一个第三方的插件,我们并没有关于其使用的详细文档。您可以在他们的网站上找到更多信息:Resonance Audio - FMOD

不过我们确实有一些可能对您有些帮助的文档:FMOD Engine | 3. Core API Guide | 3.5 Controlling a Spatializer DSP 希望您能在这里找到一些对您有用的信息。

再次感谢您提供的所有信息。

1 Like

感谢您试图解决我的问题。
那的确是创建声源的DSP。
以上内容我没有在resonanceaudio的官网上找到,上面的文档都是说明studio是如何调用的,以上内容都是我自己研究的。
最后再次感谢!辛苦了!

2 Likes