Why does it take longer for some internet audio streams to start playing on a Samsung S3?

两盒软妹~` 提交于 2019-12-31 01:06:39

问题


We are experiencing almost the exact opposite of what is mentioned here: Why does it take so long for Android's MediaPlayer to prepare some live streams for playback?

I've tested multiple streams but two in particular

1 - http://usa8-vn.mixstream.net:8138 - SampleRate: 32000Hz and Bitrate: 96 kb/s

2 - http://source01.platform02.true.nl:800 - SampleRate: 44100Hz and Bitrate: 128 kb/s

The lower bitrate stream starts playing instantly (as soon as the media player is prepared), while the higher bitrate stream takes up to two minutes to start playing. Also, when attempting to stream the higher bitrate stream I get MediaPlayer error (1, -110) (which is supposedly a MEDIA_ERROR_UNKNOWN, and MEDIA_ERROR_TIMED_OUT - obviously, because it takes too long to load something). Then, when I stop the stream, I see this in my LogCat:

05-22 20:26:13.625: E/MediaPlayer(23818): stop called in state 0
05-22 20:26:13.625: V/MediaPlayer(23818): message received msg=100, ext1=-38, ext2=0
05-22 20:26:13.625: E/MediaPlayer(23818): error (-38, 0)
...
05-22 20:26:13.645: W/MediaPlayer(23818): mediaplayer went away with unhandled events

I can't find a -38 code on the Android site, so I don't know what that is. I also am not sure which state is state 0. I'm assuming Idle because the Android site state:

There is a subtle but important difference between a newly constructed MediaPlayer object and the MediaPlayer object after reset() is called. It is a programming error to invoke methods such as ... stop() ... in the Idle state for both cases.

Anyway, the point is that I don't think it's like the before mentioned link suggests, because the higher bitrate is supposed to fill the buffer quicker than the lower bitrate stream, right? So why does it take so long to start the stream?

As a side note, this works perfectly fine on the following devices: Samsung Galaxy Music, - Note, - Note II, - S II, - S III mini and Google Nexus devices. It's JUST on the Samsung Galaxy S III that we're experiencign this lag in streaming live music from the internet.

Why??

来源:https://stackoverflow.com/questions/16693601/why-does-it-take-longer-for-some-internet-audio-streams-to-start-playing-on-a-sa

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!