Open GoogleCodeExporter opened 9 years ago
Issue happends most of the time while stopping the streaming while buffering.
Original comment by bpvela...@gmail.com
on 17 Sep 2014 at 4:29
I have manage this issue by locking the stop button until it totally started to
play or returns error. I hope you could figure out this way.
Original comment by amf...@gmail.com
on 19 Sep 2014 at 2:08
Hi,
How do you know "it totally started" ??
i tried a lot of things but i didn't succeed :/
thanks in advance,
Original comment by sepasgr...@gmail.com
on 5 Oct 2014 at 1:29
You can implement PlayerCallback as per the aacdecoder wiki
Original comment by bij...@phenomtec.com
on 7 Oct 2014 at 9:16
Thanks a lot.
I've already implement a PlayerCallBack but i guess my tests were not Ok so i
try another way to fast ^^
Is it better to use the boolean playerStarted in the playerStarted() method or
is it better to do the vérification in the playerPCMFeedBuffer with the
boolean isPlaying ?
Thanks ;)
Original comment by sepasgr...@gmail.com
on 16 Oct 2014 at 1:11
I have another solution. I belie i solved it with small patch and a fact that i start new player instance every time i need to play stream from start. I must admit that this solution isn't grate but it work. Bottom line is that player that stuck on loading will just stop as soon as it released from loading. This happens because i don't return stopped
to false
as it done in original implementation
So patch is just small change inside AACPlayer.java
So instead this:
public final void play( InputStream is, int expectedKBitSecRate ) throws Exception {
stopped = false;
if (playerCallback != null) playerCallback.playerStarted();
if (expectedKBitSecRate <= 0) expectedKBitSecRate = DEFAULT_EXPECTED_KBITSEC_RATE;
sumKBitSecRate = 0;
countKBitSecRate = 0;
playImpl( is, expectedKBitSecRate );
}
I made this:
public final void play( InputStream is, int expectedKBitSecRate ) throws Exception {
if(!stopped) {
if (playerCallback != null)
playerCallback.playerStarted();
if (expectedKBitSecRate <= 0)
expectedKBitSecRate = DEFAULT_EXPECTED_KBITSEC_RATE;
sumKBitSecRate = 0;
countKBitSecRate = 0;
playImpl(is, expectedKBitSecRate);
}
}
Im facing the same issue, cause despite im blocking the button after the click, my player needs a time limit for buffering attempt and it also haves a cancel button on buffering dialog. When one happen, i do use mPlayer.stop() but it stil buffering and then i almost lose the control of the player. For those here having another problems, i suggest some tips:
I hope some improvements in the future:
Anyway, this lib is very good and very usefull. Thanks;
Hi!
Prepared quick example: https://github.com/airstep/AACRadioPlayer
If you push start button too fast - player will be out of the control and we can't stop pervious opened streams !!! How to fix this issue?
Binary apk for test: http://tgsoft.in/work/radio_player_6.apk
For installation: adb install radio_player_6.apk
Reproduction: click start button very fast (10 times)
Nevermind, found fix at: https://github.com/mtakemi/aacdecoder-android
Original issue reported on code.google.com by
bpvela...@gmail.com
on 17 Sep 2014 at 4:27