I am trying to get a better understanding of android audio framework (froyo onwards in particular).
I've almost got the distinction into streams . The AudioFlinger maps each stream into a "strategy" and then routes a strategy to the proper "device" (BT, Headset, Speaker..)
However I still struggle to understand: 1) How multiple apps play onto the same stream? can they just 'play' or do they have to handle the focus (request, abandon and listen for changes)?
2) When multiple streams are playing...what is the priority of one stream respect to another? surely the in-call stream has top priority but are there any "rules" to understand how things really work.
If anyone with more confidence on this matter has got any doc/resource to study.. it would be great.
Thanks! Marco
Source: Tips4all
The answer to this question
ReplyDeleteConcurrent Sound on Android Device
may help you.
Also, here
http://www.droidnova.com/creating-sound-effects-in-android-part-1,570.html
is written how to initialize the SoundManager with the number of concurrent streams you want to play.