I am unable to reproduce by following the test steps you listed, but I may have misinterpreted the test sequence, and I am probably using a different device than you.
Can you please confirm: 1. which device and Android OS version is your test failing on? 2. does the test also fail on other devices from other manufacturers (for example, a Nexus family device)? 3. can you supply source code for the minimal test case that fails? Here is the test sequence I am using: create track start playing stop immediately delete (before underrun) On Tuesday, December 4, 2012 3:29:11 AM UTC-8, eleven wrote: > > Dear Glenn, > > I met one issue with FastTrack playback,which is very weird. > > when AP started a audio streming with Fastmixer, and if it try to end the > playing we will have below issue: > > AP call AudioTrack's stop function first, and the track in AudioFlinger > will set its state to STOPPING_1. > But before it happened underrun condition, that means before it change to > STOPPINT_2, then AP deleted the AudioTrack. > > And the release action will suspend current mixerthread and fastmixer, > importantly it will reset mBytesWritten to 0. > > So when the track in AudioFlinger call presentationComplete() after > changed > to STOPPINT_2, it will never return true, because mByteWritten is 0 !!! > > At last, the track in mixerthread will stay be active forerver, and its > state is TERMINATED state. > So the mixerthread will never sleep. > > Is this a issue on JB 4_1_1 ? > > Thanks > > -- unsubscribe: [email protected] website: http://groups.google.com/group/android-porting
