Hi,I meet a problem where "audio out" thread of media playback is of unexpected high performance (8% of 624MHz) during video+audio playback. It does not come up for pure audio playback. Anybody met similar situations here?
I find the problem is because that "audio out" thread is not able to obtain audio writing buffer timely. I use 8 buffer count in track creation, so dont really understand why this happens. At least one thing I find is that there are some changes in the following function: status_t AudioTrack::obtainBuffer(Buffer* audioBuffer, int32_t waitCount). It uses a specific interval of 10 ms (WAIT_PERIOD_MS) as a timing out to check the availability of audio write buffer. However, in older code base, which might be a couple of months ago, the timing out is 1 second. And I changed it back to be 1 second and that big performance cost was gone. So I guess if it could be due to many times of conditional response function in & out. Any one here could shed some light on why there is a change from 1s to 10ms? And I am not sure if I have used a correct method to solve this problem. So please correct me if I made any misunderstanding. Thanks. -- Thanks, Andy --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "android-framework" group. To post to this group, send email to android-framework@googlegroups.com To unsubscribe from this group, send email to android-framework+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-framework?hl=en -~----------~----~----~----~------~----~------~--~---