Is there an equivalent in Scala of the Java Sound API, to play sounds, or should I use the Java one??
"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."
Java Sound supports a set of audio file formats, for example AU, AIF, and WAV.
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.
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!
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With