public class MixingFloatAudioInputStream extends AudioInputStream
This class uses the FloatSampleBuffer for easy conversion using normalized samples in the buffers.
format, frameLength, framePos, frameSize| Constructor and Description |
|---|
MixingFloatAudioInputStream(AudioFormat audioFormat,
AudioInputStream original,
AudioInputStream background,
float backgroundAttenuationFactor) |
| Modifier and Type | Method and Description |
|---|---|
int |
available()
The minimum of available() of all input stream is calculated and
returned.
|
void |
close() |
static float |
decibel2linear(float decibels) |
long |
getFrameLength()
The maximum of the frame length of the input stream is calculated and
returned.
|
void |
mark(int nReadLimit)
Calls mark() on all input streams.
|
boolean |
markSupported()
returns true if all input stream return true for markSupported().
|
int |
read() |
int |
read(byte[] abData,
int nOffset,
int nLength) |
void |
reset()
Calls reset() on all input streams.
|
long |
skip(long lLength)
calls skip() on all input streams.
|
getFormat, readpublic MixingFloatAudioInputStream(AudioFormat audioFormat, AudioInputStream original, AudioInputStream background, float backgroundAttenuationFactor)
audioFormat - the audio Formatoriginal - the originalbackground - the backgroundbackgroundAttenuationFactor - the backgroundAttenuationFactorpublic long getFrameLength()
AudioInputStream.NOT_SPECIFIED, this value is returned.getFrameLength in class AudioInputStreampublic int read()
throws IOException
read in class AudioInputStreamIOException - the IOExceptionpublic int read(byte[] abData,
int nOffset,
int nLength)
throws IOException
read in class AudioInputStreamabData - the DatanOffset - the OffsetnLength - the LengthIOException - the IOExceptionpublic long skip(long lLength)
throws IOException
skip in class AudioInputStreamlLength - the lengthIOException - the IOExceptionpublic int available()
throws IOException
available in class AudioInputStreamIOException - the IOExceptionpublic void close()
throws IOException
close in interface Closeableclose in interface AutoCloseableclose in class AudioInputStreamIOException - the IOExceptionpublic void mark(int nReadLimit)
mark in class AudioInputStreamnReadLimit - the read limitpublic void reset()
throws IOException
reset in class AudioInputStreamIOException - the IOExceptionpublic boolean markSupported()
markSupported in class AudioInputStreampublic static float decibel2linear(float decibels)
decibels - the decibelsCopyright © 2015 City of Paris. All rights reserved.