Search code examples
javablackberryjava-meaudio-streamingblackberry-5

Blackberry radio app streaming audio


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.


Solution

  • 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.