01-20-2012 01:30 PM
Is it possible to read live audio data (e.g. from the phone's micrphone), very much as it is possible with Android ? The BB/JavaME media API seems only to support post processing (and the data stored in the byte buffer is encoded with an audio codec).
What I need is the raw audio signal for a given period of frames (e.g. every second or so).
Solved! Go to Solution.
01-23-2012 10:21 AM
The javax.microedition.media.Manager class can create you a Player to record audio. It's RecordControl.setRecordStream will provide you access to the stream as it is recorded. When you create the player, you can pass in extra parameters to define how often data is written to the stream and how much, in real-time. They are documented in the Manager class under 'Custom Audio Recording Parameters'.
You can specify data to be written every given milliseconds or every given number of bytes. You can align these values with the frame size to get an exact number of frames if you need.
Is that what you are looking for?