public class AppendableSequenceAudioInputStream extends SequenceAudioInputStream
Modifier and Type | Field and Description |
---|---|
protected boolean |
doneAppending |
m_audioInputStreamList, m_nCurrentStream
format, frameLength, framePos, frameSize
Constructor and Description |
---|
AppendableSequenceAudioInputStream(AudioFormat audioFormat,
Collection<AudioInputStream> audioInputStreams)
Create a sequence audio input stream to which more AudioInputStreams can be appended after creation.
|
Modifier and Type | Method and Description |
---|---|
void |
append(AudioInputStream ais)
Append the new audio input stream to the end of the list of audio input streams.
|
void |
doneAppending()
Inform this audio input stream not to expect any further calls to append(), and report end-of-stream when all data has been
read.
|
long |
getFrameLength()
Return the frame length of this appendable sequence audio input stream.
|
int |
read() |
int |
read(byte[] buf,
int off,
int len) |
available, close, mark, markSupported, reset, skip
getFormat, read
public AppendableSequenceAudioInputStream(AudioFormat audioFormat, Collection<AudioInputStream> audioInputStreams)
audioFormat
- audio formataudioInputStreams
- the list of initial audio input streams, or null if initially the stream is empty.public void append(AudioInputStream ais)
ais
- aisIllegalArgumentException
- if this method is called after doneAppending() was called.public void doneAppending()
public int read() throws IOException
read
in class SequenceAudioInputStream
IOException
public int read(byte[] buf, int off, int len) throws IOException
read
in class SequenceAudioInputStream
IOException
public long getFrameLength()
doneAppending()
has not
been called, returns AudioSystem.NOT_SPECIFIED
; after that, the frame length is the sum of the frame lengths
of individual frame lengths.getFrameLength
in class AudioInputStream
Copyright © 2000–2016 DFKI GmbH. All rights reserved.