What is the Structure of recorded data in j2me using audio/basic as type?

299 views Asked by At

I am recording audio from microphone in a j2me phone to a ByteArrayOutputStream as follows

  p = Manager.createPlayer("capture://audio?encoding=pcm");
  p.realize();  
  RecordControl rc = (RecordControl)p.getControl("RecordControl");
  ByteArrayOutputStream output = new ByteArrayOutputStream();
  rc.setRecordStream(output);  
  rc.startRecord();
  p.start();

what is the structure of recorded data ?

I mean where are the info like sample rate, size per sample,no of channels etc. stored

can i get those info after finishing the recording by converting the ByteArrayOutputStream to ByteArray using Output.toByteArray() ?

I want to get those info directly from the recorded data before loading it into another player to play it

0

There are 0 answers