No sound on android


#1

Hi,

I just implemented very basic sound functionality (following this tutorial) and it works beautifully on desktop and iOS but is completely silent on Android?

Is there some additional step to get sound to actually sound on android?

I’m using gcc instead of clang, could that be the problem?

Best,
d


#2

Thanks I’ll have a look at this.


#3

If you look at the top of the tutorial then you’ll see that the tutorial is not intended for Android and unfortunately won’t work without any changes. This is because the file chooser uses modal loops which is not supported on android. You can change the code to hardcode a file path. This should work if you additionally disable the audio input as recording audio requires runtime audio permissions. To disable audio input simply change line 36 to:

setAudioChannels (0, 2);

#4

Wow! Simple and beautiful!

Thank you!