Applet which stores 0.5 seconds of audio in an array
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.
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).
By JavaEnthusiast in forum C++
Last Post: 04-10-2009, 03:16 AM
By Tmcclain in forum Java
Last Post: 02-13-2009, 11:57 PM
Last Post: 06-13-2008, 09:11 AM
Last Post: 08-17-2006, 04:59 PM
By Charlie Flynn in forum Java
Last Post: 08-23-2001, 12:01 PM
Tags for this Thread
Top DevX Stories
Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL