Found the answer by myself. :-)
Our codes are really out-of-date, need to update and keep in pace.

>From Android 4.2, google defined several output flags:
Ÿ AUDIO_OUTPUT_FLAG_PRIMARY
Ÿ AUDIO_OUTPUT_FLAG_DEEP_BUFFER
Ÿ AUDIO_OUTPUT_FLAG_FAST
Ÿ AUDIO_OUTPUT_FLAG_NONE
Ÿ AUDIO_OUTPUT_FLAG_DIRECT
Use different Java API to create audio track will apply different output 
flags:
Ÿ 1)SoundPool: FAST flag
Ÿ 2)AudioTrack: NONE flag
Ÿ 3)MediaPlayer: (done in stagefright / NuPlayer)
             a)Pure music && duration > 5s: DEEP_BUFFER flag
             b)Other: NONE flag

On Saturday, August 10, 2013 2:33:08 PM UTC+8, Xin Qian wrote:
>
> This issue has perplexed me for a long time. Many games didn't follow 
> google's rules to add FAST flag for low latency sound (e.g. use SoundPool), 
> just use MediaPlayer to play MUSIC stream. Then how could we distinguish 
> it's real music stream or not? For real music stream, we need to use deep 
> buffer output, while for game music stream, maybe we need to use low 
> latency output for better user experience. Really eager to know how to deal 
> with such kind of issues. Thanks a lot.
>

-- 
-- 
unsubscribe: android-porting+unsubscr...@googlegroups.com
website: http://groups.google.com/group/android-porting

--- 
You received this message because you are subscribed to the Google Groups 
"android-porting" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to android-porting+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to