File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Detecting sound from microphone using Java

 
Chris Chan
Greenhorn
Posts: 3
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Hello there!

I'm running this simple code that simply listens to my microphone and prints out bytes.

Problem:
It listens to the microphone for any changes correctly on
java version "1.6.0_43"

but it doesn't listen to the microphone for any changes correctly on
java version "1.7.0_25"

Both version compile and run fine.

Example Output using Java 1.6
5172 1
5196 2
5103 3
2859 4
2549 5
2742 6
3112 7
5028 8
4515 9
3856 10
5189 11
5080 12
5165 13
4925 14

When it drops down to around 2500 that's when there was sound going into the microphone.

Example Output using Java 1.7
5652 1
5655 2
5699 3
6081 4
6213 5
5972 6
5907 7
5828 8
5931 9
6187 10
6015 11
5949 12
6196 13

It no longer detects any noise from the microphone.




Any ideas?
 
Darryl Burke
Bartender
Posts: 5115
11
Java Netbeans IDE Opera
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Please BeForthrightWhenCrossPostingToOtherSites <- link
 
Chris Chan
Greenhorn
Posts: 3
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Solved,

The issue wasn't with Java versions, I'm not sure what went wrong but it works fine after I reinstalled my audio drivers.

Thanks.
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic