-
-
Notifications
You must be signed in to change notification settings - Fork 21.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Godot returns **ERROR**: AudioOutputUnitStart failed, code: -50 on iOS
when silent mode is enabled on the iOS device
#50638
Comments
This setting is only used on macOS, not iOS. The audio driver setting is OS-specific, and not all platforms have multiple audio drivers (in fact, only Linux really does with PulseAudio and ALSA). |
Ok, good to know. Thank you. |
Same issue here, in my case with an From the ignorance, my guess is that maybe @vanoak and me have some specific hardware (or system) conditions that maybe triggers this error. I think so because it's so easy to reproduce this error, so I guess that if it was a general error it would be already discovered when creating the I use an M1 mac to build the export, can this be related? |
Godot's iOS-targeting userbase is not that large, so it's possible that nobody bothered reporting the result (or even tested it in the first place). Most core contributors don't have access to an iOS device and a macOS device (which is required to export to iOS) – that includes me. Edit: Godot does support audio playback on iOS and it's been working well so far. The issue here is that the audio generator demo likely causes specific trouble that happens to linger on when exporting other unrelated projects from the same PC. Some of the official demo projects are quite niche and don't get much testing on various platforms as a result. Unfortunately, troubleshooting this issue is pretty much impossible without hardware access. |
I see. Well, I was considering Godot for the next game for my company but it is automatically discarded based on what you said. I understand that mobile is not the current focus for the Godot team, but if in the future is, I recommend providing the same features and performing the same kind of tests for both Android & iOS, as the vast majority of companies won't bother to invest in an engine that only performs correctly in one of them. Thanks for the clarification @Calinou |
CC @godotengine/ios A minimum reproduction project as a ZIP would be useful. The steps outlined in OP are not too complex but given that it involves changing project settings, it would be best to ensure contributors have access to the exact same setup. |
@akien-mga @Calinou i can provide the minimum reproduction project, but the export settings would not be the same because i will not provide my apple developer information, so it will be a vanilla godot project file, so I think not that useful. Or I can dig a little deeper hardware-wise in order to help you troubleshoot the problem, if you tell me what am I looking for. |
Here's a reproducible example: |
Tested https://github.com/svprdga/godot-issue-50638 on stable 3.3.2 on iPhone XS (14.6).
|
Confirmed. Error still occurs but app plays sound. |
In OP you've mentioned that there was no sound. Was issue related to the silent mode? |
I have my phone always on silent mode (ringer off). I made a quick check and most of my used apps play sound even in silent mode. The two quick tests that I exported right now from Godot to iOS play sound only when silent mode is off. If that is the expected behaviour then the issue is resolved. If that is the case, I must conclude that I associated the initialisation error with running the app on silent mode, not being aware beforehand that Godot only plays audio when silent mode is off (ringer on). |
Most of the games that are installed on my phone have the same behavior (no sound in silent mode). Other apps are probably using different session category. |
Godot uses |
I can also confirm the |
That would be great, as I think that there are a lot of people with the silent mode enabled. I think that I got it enabled when I bought my iphone, so having to remember the player that if he/she doesn't hear anything might be because of their audio mode is not ideal. |
**ERROR**: AudioOutputUnitStart failed, code: -50 on iOS
when silent mode is enabled on the iOS device
Sorry to bring this up again, but is it already possible to switch to AVAudioSessionCategoryPlayback audio mode? I still didn't manage to get my sound working on iOS in silent mode. As stated above; people mainly run their iPhone on silent mode and I don't want to force my users to toggle that off for the actual sounds to play. If yes, please let me know! :-) |
It is working now (In Godot 4). Set |
Why isn't that setting the default? |
Do other games on iOS typically use the Playback category? I'd expect games to follow silent mode and therefore use the Ambient category. |
Godot version
3.3.2 stable
System information
MacOS Big Sur 11.4, iOS 12.5.4, iPhone 6
Issue description
Hello,
Made my first attempt to export to iOS. I attempted with the Audio Generator Demo from the Asset Library which I did successfully.
After that all my attempts to export even a simple app with one sprite with an AudtioStreamPlayer node running an OGG file will return the error
**ERROR**: AudioOutputUnitStart failed, code: -50
, which isMac OS error -50 (paramErr): error in user parameter list
My guess it is that something went missing from a plist file, but had I to know Godot internals to check how Godot is initialising the AudioOutput to dig deeper (i'm a competent scripter but not a developer).
Phone sound is ok with other apps, btw.
Steps to reproduce
New Project (GLES3)
Add any sprite (just to show something)
Add a AudioStreamPlayer, add an OGG audio file, on Loop and Autoplay.
Save Default Bus Layout.
Confirm that in Project Settings->Audio Driver is set to Core Audio
Export to iOS template - arm7, arm64
Open xcodeproject in XCode
Accept changes on Build Settings and translation to English.
Build successfully, runs on device but no sound;
Logs say
The text was updated successfully, but these errors were encountered: