aspose file tools*
The moose likes Java Micro Edition and the fly likes Audio Capture Configuration Question Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Mobile » Java Micro Edition
Bookmark "Audio Capture Configuration Question" Watch "Audio Capture Configuration Question" New topic
Author

Audio Capture Configuration Question

Jim Fox
Greenhorn

Joined: Mar 27, 2004
Posts: 1
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

Joined: Aug 02, 2004
Posts: 3
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

Joined: Nov 14, 2000
Posts: 1953
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

Joined: Aug 02, 2004
Posts: 3
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

Joined: Nov 14, 2000
Posts: 1953
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.
 
 
subject: Audio Capture Configuration Question