gen2brain / malgo

Mini audio library
The Unlicense
300 stars 51 forks source link

Build on android not playing audio #10

Closed marinat closed 3 years ago

marinat commented 5 years ago

I build with ndk playback.go after renaming package and main method to Run with command: gomobile bind -o pult.aar -target=android I got aar and tried to call Run. But I didn't hear any sound. In logs i saw: AUDIO_OUTPUT_FLAG_FAST denied by server; frameCount 0 -> 1772

How to build on android, it marked as supported os.

gen2brain commented 5 years ago

Can you try to build with -tags mal_debug and paste the output here so we can see format. More details are here https://android.googlesource.com/platform/frameworks/av/+/3aef35600523eb6b4ccc8086a8913e80701a031a/media/libmedia/AudioTrack.cpp#245 , below that you can find also case when it returns "denied by server" error.

Also, didn't follow the development of mini_al (now miniaudio) recently, perhaps that issue is already fixed in C lib.

gen2brain commented 3 years ago

Just tested with the latest version and some sample wav, it works with both OpenSL and AAudio.