• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Audio Capture Configuration Question

 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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 ]
 
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Ranch Hand
Posts: 1953
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic