コミュニティQ&A

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

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

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

0 支持

There's an Oculus VRC that requires audio to _always_ be outputted via the Rift headphones no mater what the Windows Output is set to (unless toggled by an in-app setting)

https://developer.oculus.com/distribute/latest/concepts/vrc-pc-audio-1/

"App must target the audio device selected in the "Audio Output in VR" setting in the Oculus app."

I cant find any way to tell Wwise what device to use from inside Unity.

(this is cross posted from the oculus forum as I've not had any answers there either :( )

We're using:

  • Wwise 2017.2.0
  • Unity Integration Bundle: 2017.2.0.947
  • Unity 2017.3.0f3
  • OVR Plugin 1.22

We're not using the OculusSpatializer plugin for wwise, but our audio director is happy with the way the game sounds and we successfully pass VRC.PC.Audio.2 (Audio specialization).

 

The only two pieces of relevant info I can find on the internet are in this post from January:

https://forums.oculusvr.com/developer/discussion/comment/576613/#Comment_576613

Feedback from our internal team:
"...it’s implemented under the hood and Unity automatically targets the Rift audio device. Unity redirects their audio to the Rift by default. If you use a third-party audio subsystem such as Wwise or FMOD, the latest version also does this. If you're using another audio system, they need to follow the guide [linked above]."

I'm not sure if "latest version" refers to Wwise, Unity or OVR, but everything we're using (afaik) is latest as of January this year.

 

and in this doc page:

https://developer.oculus.com/documentation/pcsdk/latest/concepts/dg-vr-audio/

 

Unity 5 and Wwise

To configure Wwise to use to configured audio device in Unity 5, pass the user-configured audio device name/GUID (set in the Oculus app) into the function AkSoundEngine.GetDeviceIDFromName(), located in AkInitializer.cs.

To get the audio device GUID from libOVR, you must include the Oculus Utilities unitypackage, which exposes that string through the class OVRManager.

The following function should be called before AkSoundEngine.Init(...):

[...]

 

But we're on Unity 2017, so the code snippet doesn't work, and (I think) shouldn't be necessary anymore.

--

Neither of these sources has helped get me closer to solving the problem.  Since there's so little info around, and because Wwise say their tool has been used in hundreds of games, it feels like it must be something that's (usually) automatically handled but somehow we've missed a step of flicked a switch off somewhere that no-one else does.

If anyone has any info on how we can move on with this, or even how to debug it a bit more, it would be very gratefully received!

 

--

Update 1:

I updated everything (Unity, wwise, wwise-unity, oculus, ovrplatform) to the latest available version but still get the same behaviour.

--

Update 2:

I've also tried this in place of the code snippet from the docs:

string audioDevice = OVRManager.audioOutId;
uint audioOutId = AkSoundEngine.GetDeviceIDFromName(audioDevice);
initSettings.settingsMainOutput.idDevice = audioOutId;

(just dropped into akSoundEngineController.Init(...) at line 150).

 

This results in no sound output at all, but

initSettings.settingsMainOutput.idDevice

is the only other accessible reference to a device id that I could find

Chris M. (140 ポイント) General Discussion
Hi,
No true answer right now but we are experiencing the same problem.  Looking at the code we found that when running the code that was added in the old way to fix things doesnt get hit because there is an early out at line 124 of the AKSoundEngineController init function.  It seems like AKSoundEngine.IsInitialized() is returning true on unity startup, and that function points to some external function.  In other words it seems that unity is signaling that things are properly initialized as IsInitialized points to an external function.  Just sharing info hope this helps at all.

回答 1

0 支持

I re-tried the (slightly) modified code snippet (akSoundEngineController.Init(...) at line 150):

string audioDevice = OVRManager.audioOutId;
uint audioOutId = AkSoundEngine.GetDeviceIDFromName(audioDevice);
initSettings.settingsMainOutput.idDevice = audioOutId;

And everything works exactly as expected this time.

No idea what I did or didn't do right first time, but at least it works now :)

Chris M. (140 ポイント)
I'm wondering if you can help clarify some things.

I'm having the same issue failing VRC.PC.Audio.1 (The application targets the wrong audio device) while using Unity 2019.1 and Wwise 2019.1 (with the Oculus spatializer)

I've looked through the  AkInitializer.cs file and found no reference to AkSoundEngine.GetDeviceIDFromName() nor AkSoundEngine.Init in it.

My question is, what script file should I be looking for the function akSoundEngineController.Init in order to drop this code snippet?

Or is the issue now supposed to be solved in a different way?

Whenever I open my application build the audio output does change to the Rift automatically so I'm unsure why I keep failing this test.

Thanks
I put these lines in `\Assets\Wwise\Deployment\Components\AkSoundEngineController.cs`  at line 170.  Directly before the line:

`result = AkSoundEngine.Init(memSettings, streamingSettings, deviceSettings, initSettings, platformSettings, musicSettings, spatialAudioSettings, (uint)akInitializer.preparePoolSize * 1024);`

It doesn't feel like the right thing to do to be modifying the the wwise source at that level, but it worked for us and let us pass cert, so I was happy enough in the end!
Thanks for the response.

Unfortunately, it looks like our "AkSoundEngineController.cs" are very different. Line 170 is all about Unity editor and IOS and the snippet of code you provided doesn't appear on any file in my project.

I even re-integrated the Wwise project and everything still looks the same.
I wonder why my AkInitializer and AkSoundEngineController look so different!
...