Sei sulla pagina 1di 1

VoiceChat

BufferedInputStream:
When the BufferedInputStream is created, an internal buffer array is created. As
bytes from the stream are read or skipped, the internal buffer is refilled as
necessary from the contained input stream, many bytes at a time.
TargetDataLine:
A target data line is a type of DataLine from which audio data can be read.
Some lines, once closed, cannot be reopened. Attempts to reopen such a line will
always result in a LineUnavailableException
DataLine:
DataLine adds media-related functionality.
This functionality includes transport-control methods that start, stop, drain, and
flush the audio data that passes through the line.
Data lines are used for output of audio by means of the subinterfaces SourceDataLine
or Clip, which allow an application program to write data.
A data line has an internal buffer in which the incoming or outgoing audio data is
queued.

DataLine.Info:

Besides the class information inherited from its superclass, DataLine.Info provides
additional information specific to data lines. This information includes:

* the audio formats supported by the data line


* the minimum and maximum sizes of its internal buffer

Mixer.Info:
The Mixer.Info class represents information about an audio mixer, including the
product's name, version, and vendor, along with a textual description.

SourceDataLine:
A source data line is a data line to which data may be written. It acts as a source
to its mixer. An application writes audio bytes to a source data line, which handles
the buffering of the bytes and delivers them to the mixer.
If the delivery of audio output stops due to underflow, a STOP event is generated. A
START event is generated when the audio output resumes.

AudioFormat:
AudioFormat is the class that specifies a particular arrangement of data in a sound
stream.

AudioFormat

public AudioFormat(float sampleRate,


int sampleSizeInBits,
int channels,
boolean signed,
boolean bigEndian)

Constructs an AudioFormat with a linear PCM encoding and the given parameters.
The frame size is set to the number of bytes required to contain one sample from
each channel, and the frame rate is set to the sample rate.
Parameters:
sampleRate - the number of samples per second
sampleSizeInBits - the number of bits in each sample
channels - the number of channels (1 for mono, 2 for stereo, and so on)
signed - indicates whether the data is signed or unsigned
bigEndian - indicates whether the data for a single sample is stored in
big-endian byte order (false means little-endian)

Page 1

Potrebbero piacerti anche