aacdecoder-android
aacdecoder-android copied to clipboard
Zombie players if players are rapidly created, played and stopped.
What steps will reproduce the problem?
1. Create new AACPlayer
2. Set URL with AACPlayer.playAsync()
3. Stop player with AACPlayer.stop()
4. Repeat 1-3 in quick succession
Expect only one player active at any given time but is experiencing "zombie
players" where a player keeps playing, after AACPlayer.stop() is called.
BufferReader, PCMFeed and AACPlayer all have "active threads" that doesn't exit
and clean up. With enough zombie players allocating new AudioTrack objects will
fail to initialize.
Observed with v 0.8 of library on a number of devices and emulator setups.
What is the URL of the stream ?
Varies, but always AAC.
Please provide any additional information below.
Fix implemented in attached PCMFeed.java and AACPlayer.java:
- AACPlayer
-- Added synchronized clauses around AACPlayer's stop method and stopped field.
--
- PCMFeed
-- Added early detection of AudioTrack being in an unusable state.
-- Protected calls to AudioTrack.pause() if track is not in a usuable state.
Original issue reported on code.google.com by [email protected]
on 15 May 2014 at 3:43
Attachments:
[deleted comment]
I have the same problem ?
Did you find a solution please !! i'm completly stuck.
thanks !
Original comment by [email protected]
on 19 Jan 2015 at 4:10
Look at the attached files, replace the original code with these two and the
problem should be solved.
Original comment by [email protected]
on 19 Jan 2015 at 4:13
I'm using the jar file shoud i compile a new one !
if you have one please send me !
Thanks
Original comment by [email protected]
on 21 Jan 2015 at 11:21
i made it thanks ! hope it works fine now
Thank again !
Original comment by [email protected]
on 22 Jan 2015 at 12:25
I have the same trouble.
if you please send me one it would be great ;P
(I'm a new and never compile with java)
Original comment by [email protected]
on 3 Feb 2015 at 8:46
Hi,sorry for being late ! here is the new compiled version !
Original comment by [email protected]
on 21 Feb 2015 at 10:47
Attachments: