I am working on an application that plays streaming audio using the roAudioPlayer object. When I execute the play() method, it takes a very long time to start playing the stream. The last test I ran took a total of 99 seconds from the time play() was executed until audio was heard (and the "start of play" status message was received). This problem is not limited to one specific audio stream.
If I reboot my box, this issue goes away and audio begins playing immediately. But, over time, the problem returns and it takes over a minute for audio to start playing.
The streams, which are just Shoutcast streams, play immediately on my PC and on a Roku SoundBridge that I frequently use.
This is occurring on a Roku 2 XS running version 5.1 of the firmware.
It appears to be a long-standing bug in roAudioPlayer. I've played around with various workarounds. What I'm currently doing is when I get the audio player's IsStreamStarted event, Pause then Resume the audio player, giving it a little Sleep time to think about it. It seems to work about 98% of the time. Something like this:
It doesn't seem very effective on the 3.1 firmware though. It still takes a while to buffer in that case. However, I'll change the text on the roSpringboardScreen's Play/Pause/Resume button to display a percentage showing how much buffering has been done, in response to the IsStatusMessage "startup progress" message so the user knows something is really happening (albeit slowly) rather than the channel having hung. I know this works on the Roku 2XS. I don't have a Roku 3, so I've no idea how it works (or if it's necessary) on that unit.
As a followup to @belltown's post, they also posted something about playing audio using the videoplayer instead. I accidentally stumbled on this when developing a channel and found that there were no buffering issues. This may not be ideal for some developers who are doing Audio only. I will also say I'm not a seasoned developer and may be missing something in my tests so it may be possible to make that meet your needs for Audio only. You can read the rest of my post about this here.