API Overview API Index Package Overview Direct link to this page
JDK 1.6
  javax.sound.sampled. AudioFormat View Source
Author(s)
Kara Kytle
Florian Bomers
Since
1.3
Version
1.36 05/11/17
Serial
Hierarchy
 Object
      AudioFormat
Implements
Subclasses
Description
public class AudioFormat
  AudioFormat is the class that specifies a particular arrangement of data in a sound stream.
Constructors
public AudioFormat (Encoding encoding, float sampleRate, int sampleSizeInBits, int channels, int frameSize, float frameRate, boolean bigEndian)
  Constructs an AudioFormat with the given parameters.
public AudioFormat (Encoding encoding, float sampleRate, int sampleSizeInBits, int channels, int frameSize, float frameRate, boolean bigEndian, Map<String, Object> properties)
  Constructs an AudioFormat with the given parameters.
public AudioFormat (float sampleRate, int sampleSizeInBits, int channels, boolean signed, boolean bigEndian)
  Constructs an AudioFormat with a linear PCM encoding and the given parameters.
Methods
Hide/Show inherited methods
public int getChannels ()
  Obtains the number of channels.
public Encoding getEncoding ()
  Obtains the type of encoding for sounds in this format.
public float getFrameRate ()
  Obtains the frame rate in frames per second.
public int getFrameSize ()
  Obtains the frame size in bytes.
public Object getProperty (String key)
  Obtain the property value specified by the key.
public float getSampleRate ()
  Obtains the sample rate.
public int getSampleSizeInBits ()
  Obtains the size of a sample.
public boolean isBigEndian ()
  Indicates whether the audio data is stored in big-endian or little-endian byte order.
public boolean matches (AudioFormat format)
  Indicates whether this format matches the one specified.
public Map<String, Object> properties ()
  Obtain an unmodifiable map of properties.
public String toString ()
  Returns a string that describes the format, such as: "PCM SIGNED 22050 Hz 16 bit mono big-endian".
Fields
Hide/Show inherited fields
protected boolean bigEndian
Indicates whether the audio data is stored in big-endian or little-endian order.
protected int channels
The number of audio channels in this format (1 for mono, 2 for stereo).
protected Encoding encoding
The audio encoding technique used by this format.
protected float frameRate
The number of frames played or recorded per second, for sounds that have this format.
protected int frameSize
The number of bytes in each frame of a sound that has this format.
protected float sampleRate
The number of samples played or recorded per second, for sounds that have this format.
protected int sampleSizeInBits
The number of bits in each sample of a sound that has this format.
Nested Classes
  AudioFormat.Encoding
The Encoding class names the specific type of data representation used for an audio stream.
Generated By: JavaOnTracks Doclet 0.1.4     ©Thibaut Colar