|
|
|
|
|
by szantog
4084 days ago
|
|
Android's audio stack is "pushing" audio down to the audio driver, with the audio threads sleeping between every push. In other words, the audio driver's interrupts are not scheduling the actions.
Having smaller period sizes increases the risk of not "guessing" the sleep scheduling right, resulting in many audio dropouts. Using a "pull" method is required for low latency audio, where the audio driver's interrupts are scheduling when audio is passed to and pulled from applications. Another downside of halving the period size is CPU load/battery drain. There are simply too many layers in Android's audio stack, and it has quite a few unoptimised code as well (such as converting between audio sample formats with plain C code). |
|