Coder Social home page Coder Social logo

Comments (10)

alessandrofama avatar alessandrofama commented on July 19, 2024 1

Won't expect this to be fixed anytime soon. Closing but feel free to reopen if you've got any updates.

from wwise-godot-integration.

alessandrofama avatar alessandrofama commented on July 19, 2024 1

Interesting, that's good to know, thank you for updating this issue! Then it will probably work with this integration as well. I will support 2022 once it is out of beta. It should be easy to upgrade after possible API changes are fixed.

from wwise-godot-integration.

alessandrofama avatar alessandrofama commented on July 19, 2024

I think we are not setting the Audio Session Category Options correctly due to a oversight in the cpp codebase, setting it to the Audio Session Category value, ups! Maybe fixing this will solve your problem (don't have an iOS device right now, so I hope it will!). I will provide you updated libs later.

from wwise-godot-integration.

jasonpkovalski avatar jasonpkovalski commented on July 19, 2024

Great, I will look out for the updated libs here. I appreciate the prompt responses!

from wwise-godot-integration.

alessandrofama avatar alessandrofama commented on July 19, 2024

The iOS libs from the latest push: https://github.com/alessandrofama/wwise-godot-integration/suites/5976781777/artifacts/205723631

Not sure it will actually fix this, after researching a bit I've found this documentation entry: (https://www.audiokinetic.com/library/edge/?source=SDK&id=pg_ios_working_with_audio_session_with_wwise.html):

Only audio session category AkAudioSessionCategoryPlayAndRecord allows for audio to be played 
and/or recorded in an app background state. If this behavior is required, the app info plist must also 
be modified in Xcode to add the 'Required background modes' key with the 
'App plays audio or streams audio/video using Airplay' value.

Does it actually work with AkAudioSessionCategoryPlayAndRecord for you?

Checking my private Wwise groups I've also found this post mentioning Audiokinetic confirming it's not possible (in contrast with the docs entry above):

image

Might be just an Unity issue there... don't know.

I will look for an updated answer to this issue and let you know if I got something. Sorry for the trouble!

from wwise-godot-integration.

jasonpkovalski avatar jasonpkovalski commented on July 19, 2024

@alessandrofama Just tried with the libs you provided with Audio Session Category set to both Playback and Play And Record. Unfortunately, both are not working as expected still. However, interestingly, when I pull the lock screen down and then exit the app, background audio now plays. It does not play when I go to the home screen or another app directly from the app though 🤔

from wwise-godot-integration.

jasonpkovalski avatar jasonpkovalski commented on July 19, 2024

Not sure if this is helpful at all, but I do notice a couple of errors logged in Xcode when running the app:

2022-04-07 22:02:10.119642-0400 [37033:3115785] ERROR: AudioOutputUnitStart failed, code: -50
2022-04-07 22:02:10.119684-0400 [37033:3115785]    at: start (drivers/coreaudio/audio_driver_coreaudio.cpp:249) - AudioOutputUnitStart failed, code: -50
2022-04-07 22:02:10.122286-0400 [37033:3115785] Godot Engine v3.4.2.stable.official.45eaa2daf - https://godotengine.org
2022-04-07 22:02:10.127262-0400 [37033:3115785] OpenGL ES 3.0 Renderer: Apple A15 GPU
2022-04-07 22:02:10.128397-0400 [37033:3115785] OpenGL ES Batching: ON
2022-04-07 22:02:10.256622-0400 [37033:3115785] 
2022-04-07 22:02:10.485985-0400 [37033:3115785] AK Error: Failed to set audio session category.: Error: Error Domain=NSOSStatusErrorDomain Code=2003329396 "(null)".
2022-04-07 22:02:10.486186-0400 [37033:3115785] Wwise systems initialisation succeeded
2022-04-07 22:02:10.486413-0400 [37033:3115785] ERROR:  does not have a library for the current platform.
2022-04-07 22:02:10.486431-0400 [37033:3115785]    at: init_library (modules/gdnative/nativescript/nativescript.cpp:1486) - Condition "lib_path.length() == 0" is true.
2022-04-07 22:02:10.486452-0400 [37033:3115785] ERROR: Script does not inherit a Node: res://wwise/bin/waapi-gdnative-debug.gdns
2022-04-07 22:02:10.486462-0400 [37033:3115785]    at: start (main/main.cpp:1832) - Condition "!valid_type" is true. Continuing.

Even with the above errors, the audio works fine other than playing in the background, so I don't know if these are relevant to this issue.

from wwise-godot-integration.

alessandrofama avatar alessandrofama commented on July 19, 2024

I don't think the errors are too relevant:

ERROR: AudioOutputUnitStart failed, code: -50

is a unrelated Godot bug.

AK Error: Failed to set audio session category.: Error: Error Domain=NSOSStatusErrorDomain Code=2003329396 "(null)".

This seems relevant at first glance, the error code is kAudioSessionUnspecifiedError (not very helpful). In my tests posted below, I do not get this error, and background audio still does not work.

ERROR:  does not have a library for the current platform. [...]

The Waapi library didn't get exported (as expected), unrelated but should fix this soon.

I was playing a bit in the iOS simulator today and I think Wwise just suspends the audio engine and ignores the audio session category and audio session category options.

  • In the small integration demo included in the Wwise SDK, background audio does not work even if all settings are correct. You can find the demo in /Applications/Audiokinetic/Wwise 2021.1.../SDK/samples/IntegrationDemo/iOS if you want to try it yourself. They set the Audio Session Category in IntegrationDemoAppDelegate.mm.
  • I looked at the source code of Godot and they actually set the category of AVAudioSession to Ambient. Changing this category to Playback or even removing these parts from the source code (in case they conflict with Wwise's handling of the audio session) did not produce any results.
  • In an example provided by Apple with the same settings, background audio works fine without Wwise.

Based on these tests, I would provisionally assume that this is an internal Wwise issue and not a problem with our integration or with the Godot engine. Please let me know if you manage to make this work(I think the integration demo in the SDK would be the best testing environment to check this). Maybe there is a setting I missed or something else that needs to be done to make background audio work.

from wwise-godot-integration.

jasonpkovalski avatar jasonpkovalski commented on July 19, 2024

@alessandrofama Thank you for looking into this further, and sorry for the delay on my end. I can confirm that I cannot get background audio working even with the Integration Demo provided by Wwise. As far as I can tell, all of the necessary settings seem correct too.

Do you have any ideas on how to proceed? Maybe I just need to contact someone on the Wwise side of things directly? This is a necessary feature for many use cases, and it currently does not seem possible.

from wwise-godot-integration.

jasonpkovalski avatar jasonpkovalski commented on July 19, 2024

@alessandrofama I found out that Wwise 2022.1 will support iOS background audio. I tried the integration demo included in the Wwise 2022.1 Beta Preview 1 and confirmed that the background audio demo does work now. I just wanted to provide an update so you're aware that it was, in fact, an issue with Wwise and also that it will be resolved relatively soon in an upcoming release!

from wwise-godot-integration.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.