Blackberry radio app streaming audio

痴心易碎 提交于 2019-12-25 08:51:28

问题


I am building a radio app in BB 5. I have a .pls url where I find my urls to play the stream. My issue is. I need to build a Buffer to play this stream because the file which is downloaded is too big to play it inmediatly, but I don't know how to build this buffer. Any idea? I think that it must be something similar to that

Streaming media BB

But I want something more simple, only play and stop the radio streaming.


回答1:


Ok I've solved this, using the package of streaming from the code mentioned in the link above. I've added the CircularByteBuffer from the small link, showed in article. There is a class in the straming package which needs some fixes (in some BufferOverflowException and the resize method from CircularByteBuffer). And now my project is working! Great!

ADD

The fixes were in the StreamingPlayer class, there is a call to method resize with some int parameter. In the CircularByteBuffer code, the method is resize(), so doesn't need int parameters, it doubles the buffer capicity. So I change that call, using the resize() without int parameters. The other fix is about BufferOverflowException. In the code this object has a String, but it gives an error. I delete this Strings.



来源:https://stackoverflow.com/questions/15098239/blackberry-radio-app-streaming-audio

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