커뮤니티 Q&A

Audiokinetic의 커뮤니티 Q&A 포럼에 오신 것을 환영합니다. 이 포럼은 Wwise와 Strata 사용자들이 서로 도움을 주는 곳입니다. Audiokinetic의 직접적인 도움을 얻으려면 지원 티켓 페이지를 사용하세요. 버그를 보고하려면 Audiokinetic 런처에서 Bug Report 옵션을 사용하세요. (Q&A 포럼에 제출된 버그 보고는 거절됩니다. 전용 Bug Report 시스템을 사용하면 보고 내용이 담당자에게 정확히 전달되어 문제 해결 가능성이 크게 높아집니다.)<segment 6493>

빠르고 정확한 답변을 얻으려면 질문을 올릴 때 다음 팁을 참고하세요.

  • 구체적인 내용을 적어주세요: 무엇을 하려는지, 혹은 어떤 특정 문제에 부딪혔는지 설명하세요.
  • 핵심 정보를 포함하세요: Wwise와 게임 엔진 버전, 운영체제 등 관련 정보를 함께 제공하세요.
  • 시도한 방법들을 알려주세요: 문제 해결을 위해 이미 어떤 단계를 시도해봤는지 설명해주세요.
  • 객관적인 사실에 초점을 맞추세요: 문제의 기술적 사실을 중심으로 설명하세요. 문제에 집중할수록 다른 사람들이 더 빠르게 해결책을 찾을 수 있습니다.

0 투표

Hello, I'm trying to write a custom effect plugin in Wwise for the first time and used the wp.py workflow described in the documentation. I'd like my plugin Execute function to read the current value of a state group. I'm unable to call AK::SoundEngine::Query::GetState or access the AkStateMgr due to link errors (the functions are undefined)

When I do add the following libraries under Additional Dependencies in my Linker input settings, I then get an error "LNK 2005 g_pAKPluginList already defined" from my plugin as well as AkEffectsMgr.obj 

  • AkMemoryMgr.lib
  • AkSoundEngine.lib
  • AkMusicEngine.lib
  • AkStreamMgr.lib
  • CommunicationCentral.lib

Am I going about this the wrong way? Should I be modifying AK::IAkGlobalPluginContextEx to expose functionality to my plugin?

Thank you

General Discussion Sheri B. (290 포인트) 로 부터

1 답변

0 투표
 
우수 답변

The sound engine libraries you listed here are indeed meant for a game to link with and cannot be used for plug-ins. Accessing sound engine services from a plug-in is possible, but it is limited to what is offered to the plug-in context: AK::IAkGlobalPluginContext.

Some details on the infrastructure of plug-ins to understand the error: each plug-in library exports a linked-list of plug-ins it contains through the global symbol g_pAKPluginList. A corresponding linked-list in the sound engine SDK libraries contains the aggregated linked-list from all plug-ins, which is built at static initialization through the AK::PluginRegistration instances generated by the AK_STATIC_LINK_PLUGIN macro located in the factory file of the plug-in, or loaded as needed when using dynamic libraries (in which case the game does not include the factory file). Having both your plug-in and the sound engine SDK define g_pAKPluginList is why you get the "LNK 2005 g_pAKPluginList already defined" error.

Now, instead of querying for a specific state group, you should rely on the parameter abstraction so that any state group can be used and so that the mapping of values is user-defined.
To add an RTPC-enabled parameter to your plug-in that supports states, add the SupportRTPCType="Additive" attribute to a property in your plug-in XML definition; details can be found on the documentation page Plug-in Property and Custom Property XML Description. Refer to the AkDelay sample effect plug-in found in "SDK/samples/Plugins/AkDelay" for an example of such plug-in that supports states.

Samuel L. (Audiokinetic) (23.6k 포인트) 로 부터
선택됨 Sheri B. 로 부터
Thank you for the detailed answer!

Is there a way for Reference type parameters to support RTPCs? I'd like to write to a different RTPC depending on a State.
Not sure what is the end goal for "writing to a different RTPC" from your plug-in's perspective, but references do not support RTPCs. You can always have a property with Enumeration restriction to select from a range of predefined values.
Ok, I figured as much and have essentially done that, thank you.
The plugin is to help us with dynamic mixing, outputting different RTPCs based on a state to duck busses differently.

Sorry, one last question for you about reading the Object Reference Id when it's set in the authoring tool. The NotifyPropertyChanged I've implemented on my plugin is called, but it's unclear how to read its unique Id.
I can see that guids are written to the xml on save, but querying the m_propertySet appears to give an uninitialized value, and SetParam on the parameters is not called.
...