• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Audio Capture Configuration Question

 
Jim Fox
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am trying to sample the microphone using a recordStream. How do I control the rate, bits, unsigned, etc...

If I use:
p = Manager.createPlayer("capture://audio");
Under Ktools everything slows to a trickle and takes about 5 seconds to record 20 miiliseconds worth of data, then i get aboput 80,000 bytes of data that appears to be 16 bits
in the Manager class description
http://www.cs.kent.ac.uk/teaching/03/modules/CO/6/25/doc/LOC/MMA/javax/microedition/media/Manager.html
it says I can do things like:
Manager.createPlayer("capture://audio?bits=8");
When I do this I get:
Cannot create a DataSource for: capture://audio?bits=8
How can I control the sample rate, # of bits etc...?
Thank You
[ March 30, 2004: Message edited by: Jim Fox ]
 
Frank Siegmann
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What WTK do you use? I got the same problem with J2ME WTK 2.1 but with the version 2.0 it works , for example :

Player player = Manager.createPlayer("capture://audio? rate=8000&bits=8&Channels=1");

Frank
 
Roseanne Zhang
Ranch Hand
Posts: 1953
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I've not used wtk2.1, but I've heard from other forums, wtk2.1 requires a seperated thread to do what you wanted to do.

Let us know if this helps.
 
Frank Siegmann
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
My capturing routine is already running in a separate thread. Could you please explain more detailed what do you mean or give me a link where i can find more information about this problem (which forum?)

thanks in advance
 
Roseanne Zhang
Ranch Hand
Posts: 1953
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Sorry! It was ChinaJavaWorld.net and in Chinese. And worse than that, the forums are closed for space problems recently.

Hopefully, they will open again soon.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic