public class AudioUtils extends Object
Constructor and Description |
---|
AudioUtils() |
Modifier and Type | Method and Description |
---|---|
static double |
frequencyToBarkFrequency(double freq)
Converts a frequency to a Bark frequency
|
static double |
frequencyToMelFrequency(double freq)
Converts a frequency to an approximation of a Mel frequency.
|
static SourceDataLine |
getAnyJavaOutputLine(AudioFormat af)
Gets a Java output line (SourceDataLine) that can play something with
the given audio format.
|
static List<AudioDevice> |
getDevices()
Returns a list of devices that are available on this system.
|
static SourceDataLine |
getJavaOutputLine(String deviceName,
AudioFormat af)
Returns a Java sound line for the given device name.
|
static void |
main(String[] args) |
static double |
melFrequencyToFrequency(double melFreq)
Converts a Mel frequency back into an approximation of a frequency.
|
public AudioUtils()
public static List<AudioDevice> getDevices()
public static SourceDataLine getJavaOutputLine(String deviceName, AudioFormat af) throws LineUnavailableException
AudioDevice.deviceName
as input to this method. Use
getDevices()
to get an AudioDevice
object.deviceName
- The device name.af
- The formatLineUnavailableException
public static SourceDataLine getAnyJavaOutputLine(AudioFormat af) throws LineUnavailableException
af
- The audio format.LineUnavailableException
public static double frequencyToMelFrequency(double freq)
freq
- The frequency to convertpublic static double melFrequencyToFrequency(double melFreq)
melFreq
- The Mel frequency to convertpublic static double frequencyToBarkFrequency(double freq)
freq
- The frequency to convert