Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is there an equivalent of the Java Sound API?

Tags:

scala

Is there an equivalent in Scala of the Java Sound API, to play sounds, or should I use the Java one??

like image 596
Luis Galeana Avatar asked Oct 23 '11 01:10

Luis Galeana


People also ask

What is Java Sound API?

"The Java Sound API is a low-level API for effecting and controlling input. and output of audio media. It provides explicit control over the capabilities. commonly required for audio input and output in a framework that promotes. extensibility and flexibility."

Does Java support WAV?

Java Sound supports a set of audio file formats, for example AU, AIF, and WAV.

How do you record audio in Java?

Obtain a TargetDataLine object which represents an input data line from which audio data can be captured, using the method getLineInfo(DataLine.Info) of the AudioSystem class. Open and start the target data line to begin capturing audio data. Create an AudioInputStream object to read data from the target data line.


1 Answers

I'd go and use the Java Sound Api. At the time of writing this (October 2011) alternatives aren't mature enough.

When interacting with an existing Java Api from scala, you'll find JavaConversions pretty useful.

Good luck!

like image 194
Pablo Fernandez Avatar answered Oct 20 '22 21:10

Pablo Fernandez