Skip to main content

Java Sound

1 reply [Last post]
vitty85
Offline
Joined: 2007-07-20
Points: 0

Hi....I'm newbie in this project...i have two question....

Is possible to record a sound from the microphone and reproduce it by speakers?

Could I include in my app the "javax.sound" library or at this time is impossible?

Thanks...

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
stanar
Offline
Joined: 2006-11-01
Points: 0

Hello vitty85,

If we are talking about Java ME (Micro Edition), you should use JSR-135 component for sound issues. See specification here: http://java.sun.com/javame/reference/apis/jsr135/

Here's code example for recording:
http://java.sun.com/javame/reference/apis/jsr135/javax/microedition/medi...

After recording you may playback recorded sound.

Normally, you don't playback while recording, because it will definitely interfere with what you are recording on such a small device like mobile phone. But it may be also possible on some JSR-135 implementations to start playback from the stream being used for recording at the same time.

Hope this covers what you're looking for.