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: 8
Registered: ‎10-13-2011
My Device: Developer
My Carrier: Developer

Player intila buffer problem

I am being able to record and play simultaneously. But there are few problems,


1. Player is starting after 35 sec. It is asking for 204800 bytes of data 3 times before start. When I used fixed sized audio data i.e. wav header has a definite length, it asks for 58 KB of data but not when I use 0x7fffffff as data length in wave header(to do streaming) it does as mentioned..


2. So i tired to satisfy the player with silence data (i.e. byte array filled with 0) whenever there is no data to read and flushed the buffer whenever next data is available. In this case player starts immediately but no audio is being played. Though I can see mediatime event is coming throughout. Do I need to supply the header again after flush? What is the right way to use flush?


Please help on above two points.