Package ipsk.db.speech
Class AudioFormat
- java.lang.Object
-
- ipsk.db.speech.AudioFormat
-
@Entity public class AudioFormat extends java.lang.ObjectAudio format.- Author:
- K.Jaensch, klausj@phonetik.uni-muenchen.de
-
-
Constructor Summary
Constructors Constructor Description AudioFormat()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleangetBigEndian()intgetChannels()Number of channels.java.lang.StringgetEncoding()Encoding name.intgetFrameSize()Framesize in bytes of one audio frame.java.lang.StringgetName()Get name of audio format.java.util.Set<Project>getProjects()intgetQuantisation()Get quantisation (sample size in bits), e.g. 16 for CD-DA Quality.doublegetSampleRate()Get samplerate.voidsetBigEndian(boolean b)Set to true if the byte order is big endian.voidsetChannels(int i)Set number of channels.voidsetEncoding(java.lang.String encoding)voidsetFrameSize(int i)Set frame size.voidsetName(java.lang.String string)set the name of the audi format.voidsetProjects(java.util.Set<Project> projects)voidsetQuantisation(int quantisation)Set quantisation in bits.voidsetSampleRate(double d)Set sample rate in Hz.java.lang.StringtoString()
-
-
-
Method Detail
-
setName
public void setName(java.lang.String string)
set the name of the audi format. Something like 'CD quality'.- Parameters:
string-
-
getName
public java.lang.String getName()
Get name of audio format.
-
getEncoding
public java.lang.String getEncoding()
Encoding name. JavaSound terms should be used. ('PCM_SIGNED')- Returns:
- encoding as string
-
setEncoding
public void setEncoding(java.lang.String encoding)
-
getChannels
public int getChannels()
Number of channels.- Returns:
- channels
-
getFrameSize
public int getFrameSize()
Framesize in bytes of one audio frame. For PCM encoding this is equal to the size of one sample multiplied by the number of channels.- Returns:
- frame size in bytes
-
getSampleRate
public double getSampleRate()
Get samplerate.- Returns:
- samplerate in Hz
-
getQuantisation
public int getQuantisation()
Get quantisation (sample size in bits), e.g. 16 for CD-DA Quality.- Returns:
- quantisation
-
getBigEndian
public boolean getBigEndian()
-
setBigEndian
public void setBigEndian(boolean b)
Set to true if the byte order is big endian.- Parameters:
b-
-
setChannels
public void setChannels(int i)
Set number of channels.- Parameters:
i-
-
setFrameSize
public void setFrameSize(int i)
Set frame size.- Parameters:
i-
-
setSampleRate
public void setSampleRate(double d)
Set sample rate in Hz.- Parameters:
d-
-
setQuantisation
public void setQuantisation(int quantisation)
Set quantisation in bits.- Parameters:
quantisation-
-
getProjects
public java.util.Set<Project> getProjects()
-
setProjects
public void setProjects(java.util.Set<Project> projects)
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-