Applet which stores 0.5 seconds of audio in an array


DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 2 of 2

Thread: Applet which stores 0.5 seconds of audio in an array

  1. #1
    Join Date
    May 2009
    Posts
    2

    Question Applet which stores 0.5 seconds of audio in an array

    Hi everyone,

    I'm new to Java programming, and I'm trying something a little complicated. I wish to use Java write an applet to listen to a microphone or line in port and wait for the input signal to reach positive saturation.

    When the signal has saturated, I would then like to record the next 0.5 seconds of audio data samples into a numerical array.

    Please may somebody explain how I can achieve this, if it is possible.

    After that, I know what I want to do with the numerical array and how to do it.

    I am using JDK 1.6.0_13

    Thank you to everyone who can help.

  2. #2
    Join Date
    Mar 2007
    Location
    Bangalore, India
    Posts
    247
    There are a couple of things to know here.

    1) The Java Sound API - This is how you get to capture or play sound using Java.
    javax.sound.sampled is exactly what you require. The Guide here will help you get started with using sound within half an hour.

    2) Security - By default, only signed applets can access sound APIs if I remember right. If you want an unsigned applet to capture sound, you should manually set the required permissions on the target JVM. See this for the permission to set, and this for more info on policy file(s).

Similar Threads

  1. Replies: 1
    Last Post: 04-10-2009, 02:16 AM
  2. Reversing an Array
    By Tmcclain in forum Java
    Replies: 7
    Last Post: 02-13-2009, 10:57 PM
  3. Serious problem with a website!
    By Loham in forum Java
    Replies: 1
    Last Post: 06-13-2008, 08:11 AM
  4. Replies: 0
    Last Post: 08-17-2006, 03:59 PM
  5. Replies: 3
    Last Post: 08-23-2001, 11:01 AM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center