What does status-12 mean in Android AudioTrack?

When using Android soundpool / audioTrack, I keep getting the following error:

AudioFlinger could not create track, status: -12 Error creating AudioTrack 

Can someone explain what -12 ? Is this the value of some enumeration from the source code?

I saw other issues related to the -12 error, but nowhere do I finally see what this constant actually means. Does anyone know a list of possible statuses for AudioFlinger? I also saw a -22 error around, but I don't know what that means.

The answers, backed up by source code or documentation, would be the best, but I will take any information I can get at this point.

+4
source share
2 answers
 -12 is ENOMEM Not enough space -22 is EINVAL Invalid argument. 

These are the standard POSIX error codes.

+7
source

-12 means you can no longer create a track. The Android Audio Framework allows you to play only 32 tracks at a time (including play / stop / pause / ...) per mixer stream.

try uninstalling some applications in the background, you can create it.

+5
source

Source: https://habr.com/ru/post/1434777/


All Articles