Coder Social home page Coder Social logo

Comments (9)

alessandrofama avatar alessandrofama commented on July 19, 2024

Yep, this is handled here:

void Wwise::_notification(int notification)
{
#if defined(AK_ANDROID) || defined(AK_IOS)
if (notification == NOTIFICATION_WM_FOCUS_OUT)
{
Wwise::suspend(false);
}
if (notification == NOTIFICATION_WM_FOCUS_IN)
{
Wwise::wakeupFromSuspend();
}
#endif
}

It's hardcoded right now, but ideally this should be an option in the project settings. Pushed the fix, should be available soon after the GitHub actions are completed.

from wwise-godot-integration.

alessandrofama avatar alessandrofama commented on July 19, 2024

Libs to replace:
Android
iOS
macOS
Windows
Linux

Replace this file in the wwise folder: https://raw.githubusercontent.com/alessandrofama/wwise-godot-integration/main/wwise-gdnative/gdnative-demo/wwise/wwise_settings.gd

and disable this setting in the project settings (Wwise - Common User Settings):
image

from wwise-godot-integration.

stacyh3 avatar stacyh3 commented on July 19, 2024

I gave this a quick try on an Android device. I'm a long time developer, but new to Android and Godot, so there may be something else needed. When I go to the phone's home screen, playback stops. When I switch back to the app, playback starts again.

Thanks for being super responsive! Your work is excellent!

from wwise-godot-integration.

alessandrofama avatar alessandrofama commented on July 19, 2024

Works on desktop, I will try it on my Android device later today! Not super experienced in working with mobile.. there may be some setting to keep the app alive.

from wwise-godot-integration.

alessandrofama avatar alessandrofama commented on July 19, 2024

I've tried this out on an old Xiaomi Redmi Note 3 (Android 7.0) and on a newer Android 10 device. Switching to the home screen or locking while audio is playing works fine.

If you applied the changes mentioned above it should work. Not sure what the cause of the problem is. Maybe try to activate and deactive the WwiseSettings script in the autoload tab of the project settings. Might be that the new Suspend At Focus Loss option in the settings does not get applied correctly.

If you manage to find time for a simple repro project I can take another look at this. :-)

from wwise-godot-integration.

stacyh3 avatar stacyh3 commented on July 19, 2024

I'll try for a repro project. I may have goofed up on the settings. Should I close this for now or leave it going until I can test. It might be a few days.

from wwise-godot-integration.

alessandrofama avatar alessandrofama commented on July 19, 2024

You can leave this issue open, does not bother me at all.

from wwise-godot-integration.

stacyh3 avatar stacyh3 commented on July 19, 2024

Thanks. I'm testing between other things at work. I went back to a simple empty Godot project and I can build and deploy it. When I add in the Wwise features I'm getting a apksigner error. I'll try to track this down and get a working test.

from wwise-godot-integration.

stacyh3 avatar stacyh3 commented on July 19, 2024

Success! I started with an empty app and checked the export at each step. Working great! Thanks! You are fantastic! Now I'm thinking about doing a similar type of integration project for Xamarin/MAUI apps. Hmm... Thanks again!

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.