Package ipsk.audio.utils
Class AudioFormatUtils
- java.lang.Object
-
- ipsk.audio.utils.AudioFormatUtils
-
public class AudioFormatUtils extends java.lang.Object
- Author:
- K.Jaensch, klausj@phonetik.uni-muenchen.de
-
-
Constructor Summary
Constructors Constructor Description AudioFormatUtils()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static javax.sound.sampled.AudioFormat.Encoding
getEncodingByName(java.lang.String name)
static java.util.List<LocalizableMessage>
getFormatQualityWarningsForProfile(javax.sound.sampled.AudioFormat format, Profile profile)
static java.lang.String
getMimetype(javax.sound.sampled.AudioFileFormat.Type type)
static java.lang.Double
lengthInSeconds(AudioSource audioSource)
static float
pcmLengthFromByteLength(javax.sound.sampled.AudioFormat audioFormat, int sizeInBytes)
static int
pcmSizeInBytesFromLength(javax.sound.sampled.AudioFormat audioFormat, float seconds)
-
-
-
Method Detail
-
getEncodingByName
public static javax.sound.sampled.AudioFormat.Encoding getEncodingByName(java.lang.String name)
-
getMimetype
public static java.lang.String getMimetype(javax.sound.sampled.AudioFileFormat.Type type)
-
pcmSizeInBytesFromLength
public static int pcmSizeInBytesFromLength(javax.sound.sampled.AudioFormat audioFormat, float seconds) throws AudioFormatNotSupportedException
- Throws:
AudioFormatNotSupportedException
-
pcmLengthFromByteLength
public static float pcmLengthFromByteLength(javax.sound.sampled.AudioFormat audioFormat, int sizeInBytes) throws AudioFormatNotSupportedException
- Throws:
AudioFormatNotSupportedException
-
getFormatQualityWarningsForProfile
public static java.util.List<LocalizableMessage> getFormatQualityWarningsForProfile(javax.sound.sampled.AudioFormat format, Profile profile)
-
lengthInSeconds
public static java.lang.Double lengthInSeconds(AudioSource audioSource) throws AudioSourceException
- Throws:
AudioSourceException
-
-