Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Java Development

New Contributor
Posts: 2
Registered: ‎09-06-2012
My Device: Torch 9800
My Carrier: Bell

Audio streaming sounds extremely slow

I am having some issues trying to stream a PCM audio source over http. For some reason when I try to play the stream, the audio sounds EXTREMELY slow.


ZRTrack track = (ZRTrack)data.elementAt(0);
url = track.getTrackURL()+";deviceside=true";
ZRStreamPlayer mp = new ZRStreamPlayer();

// Decode and Stream the audio into the CircularByteBuffer
mp.Play(url); try{ Player p = Manager.createPlayer(CircularByteBuffer.getInstance().getInputStream(), "audio/x-pcm"); p.realize(); VolumeControl volume = (VolumeControl)p.getControl("VolumeControl"); volume.setLevel(60); p.prefetch(); p.start(); }catch(MediaException me){ Dialog.alert(me.toString()); PMPELogger.getInstance().error("PLAYER ERROR", me.toString()); }catch(IOException ioe){ Dialog.alert(ioe.toString()); PMPELogger.getInstance().error("PLAYER ERROR", ioe.toString()); }catch(Exception e){ e.printStackTrace(); PMPELogger.getInstance().error("PLAYER ERROR", e.toString()); }

 I am not sure where or what to look for in order to figure this out. I am not allowed to post all of the internal code in the ZRStreamPlayer, but if you need to see more code then let me know exactly what you are looking for and I can try to provide it.


Thanks in advance!