Hi everyone! I have a problem that I just can't seem to figure out. I have a project that should play a sound. I'm using a normal AudioStreamPlayer with a .wav file. When I run the project on my PC, running Linux, sound works great. But when I export for iOS I get no sound at all no matter what I do. Godot is version 3.1 and the iOS App runs fine otherwise. I have tried different wav-files as well as switching from stereo to mono.

Is there any known errors with sound on iOS, or have I simply missed something? Any help would be appreciated! :)

It might be when I turn Audio Input on in the Project Settings. Odd, but turning it off made the sound work.

.wav is a container. It's likely a codec issue, i.e. whatever codec you have used isn't supported in iOS I guess? Try different audio codec, or different format altogether perhaps?

https://en.wikipedia.org/wiki/WAV#Comparison_of_coding_schemes https://stackoverflow.com/questions/38128165/is-wav-file-supported-on-ios

edit: I see that you got it working. I wonder if it was just an audio channel buffering issue or something. Seems odd to me.

Yeah, it really is odd. I tried with various wav codecs as well as ogg-files without result, but once I turned off Audio Input they all worked. Thanks anyway for your post, that information might be useful in the future. I thought that as long as the file played on my computer it would play on iOS, but now I know better. :)

9 months later

I have the same issue here in Godot 3.2.1. I just wrote a detailed thread and waiting for approval.

Turning off Audio Input shouldn't affect playing sound(Audio Output) I guess, but it will ban Mic record(Audio Input), iOS won't even ask permission for mic recording if turning off Audio Input. The same project works on Android very well. Maybe some kind of channel overlapping bug or did I miss anything else?

a year later

I have the same problem and I am running 3.3.4.

3 months later

Enable Audio Input is unchecked in my project settings. But on iOS there is no sound, while in the editor and on Android and HTML5 it works fine. Actually, even in XCode simulator the sound works, but not on the iphone.

I am trying to play .ogg files. I set the stream in two ways, neither works: 1. Using the normal load("path") 2. And reading the file, getting the buffer, and putting the buffer in stream data

What am I missing?

EDIT: And also 3. Some .ogg sounds I already added to the AudioStreamPlayer node inside the scene as fixed sounds. And pressing a button plays them. But also that does not work

Could it be the import settings for the audio by any chance? I'm not sure what the correct settings would be though.

I didn't see any open issues for playing audio on iOS on Godot, just a few issues with recording audio. If you can reproduce the issue with the latest version of Godot (3.X or 4.0), it may be worth making an issue on the Godot GitHub repository. If possible, please also include a reproduction project, as that will make it easier to test and fix.

a year later
2 months later

Hello. Same problem with Godot 3.5
I have to switch the iphone silence button (upper left). Then it works. But I think it is not a solution

    joseanquiles I would check if there is an issue open for this on GitHub already and if there is not, then I would make an issue for it. If you can, attaching a minimum reproduction project may also be helpful.

    a year later