コミュニティQ&A

Audiokineticのコミュニティ主導のQ&Aフォーラムへようこそ。ここはWwiseとStrataのユーザのみなさまがお互いに協力し合う場です。弊社チームによる直接のサポートをご希望の場合はサポートチケットページをご利用ください。バグを報告するには、Audiokinetic LauncherのBug Reportオプションをご利用ください。(Q&AフォーラムではBug Reportを受け付けておりませんのでご注意ください。専用のBug Reportシステムをご利用いただくことで、バグの報告が適切な担当部門に届き、修正される可能性が高まります。)

最適な回答を迅速に得られるよう、ご質問を投稿される際は以下のヒントをご参考ください。

  • 具体的に示す:何を達成したいのか、またはどんな問題に直面しているのかを具体的に示してください。
  • 重要な詳細情報を含める:Wwiseとゲームエンジンのバージョンやご利用のOSなど詳細情報を記載してください。
  • 試したことを説明する:すでに試してみたトラブルシューティングの手順を教えてください。
  • 事実に焦点を当てる:問題の技術的な事実を記載してください。問題に焦点を当てることで、ほかのユーザのみなさまが解決策を迅速に見つけやすくなります。

0 支持

Hello,

I'm trying to understand the behavior of Wwise when calling SoundEngine functions on a global callback on, say the AkGlobalCallbackLocation_Begin location, and I have a bunch of questions:

In my callback, if I call AK::SoundEngine::PostEvent(), will that Event trigger on that same update? The callback is in the event thread, so does the system know to enqueue it and process it immediately? I see that the callback includes an AK::IAkGlobalPluginContext pointer, which has a PostEventSync() function. Should I use that instead? Will there be any difference between them in this case?

What about other calls, such as SoundEngine::SetRTPCValue(), SoundEngine::SetSwitch(), or SoundEngine::SetState()? The global plugin context has an SetRTPCValue() function. Is that synchronous like PostEventSync()? Should I prefer calling that function from the global callback? There's no equivalent for SetSwitch() and SetState(), so what is the behavior there? Will the changes get processed in the current frame?

Similar question for GameObject-related functions: will AK::SoundEngine::SetPosition() work correctly when called from a global callback, and will it execute that same frame?

Are there any SoundEngine functions that I should avoid calling from a global callback?

Thank you!

(We're currently using Wwise 2024.1.)

Guy Somberg (130 ポイント) General Discussion

回答 1

0 支持
 
ベストアンサー

Hello Guy,

 

The developers suggest that you review the ````CAkAudioMgr::DoUpdateAndRenderIterationAsync definition in the sound engine code.

 

You are looking for:

AkGlobalCallbackLocation_PreProcessMessageQueueForRender

AkGlobalCallbackLocation_PostMessagesProcessed

 

The first one will allow you to have the Event trigger in the same update, the latter will defer it to the next audio tick/frame.

 

We do not think any sound engine functions should be avoided in a global callback (aside from obvious recursive ones like "call synchronous Render Audio").
 

I hope this helps!

Guillaume


 

Guillaume R. (Audiokinetic) (11.6k ポイント)
Alessandro Famà (Audiokinetic) 選択
Thank you!  This is very helpful and is guiding me in the right direction.
...