|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectjava.io.InputStream
javax.sound.sampled.AudioInputStream
org.tritonus.sampled.convert.SampleRateConversionProvider.SampleRateConverterStream
public static class SampleRateConversionProvider.SampleRateConverterStream
SampleRateConverterStream
| Field Summary | |
|---|---|
static int |
LINEAR_INTERPOLATION
Conversion algorithm |
static int |
RESAMPLE
Conversion algorithm |
static int |
SAMPLE_AND_HOLD
Conversion algorithm |
| Constructor Summary | |
|---|---|
SampleRateConversionProvider.SampleRateConverterStream(AudioInputStream sourceStream,
AudioFormat targetFormat)
|
|
SampleRateConversionProvider.SampleRateConverterStream(FloatSampleInput sourceInput,
AudioFormat targetFormat,
long frameLength)
|
|
| Method Summary | |
|---|---|
int |
available()
|
void |
close()
|
void |
flush()
Flushes the internal buffers |
int |
getChannels()
|
int |
getConversionAlgorithm()
|
int |
getFrameSize()
|
float |
getSampleRate()
|
int |
getSourceFrameSize()
|
float |
getTargetSampleRate()
|
boolean |
isClosed()
|
boolean |
isDone()
Determine if this stream has reached its end. |
void |
mark(int readlimit)
|
boolean |
markSupported()
|
int |
read()
|
int |
read(byte[] abData)
|
int |
read(byte[] abData,
int nOffset,
int nLength)
Read nLength bytes that will be the converted samples of the original inputStream. |
void |
read(FloatSampleBuffer outBuffer)
Fill the entire buffer with audio data. |
void |
read(FloatSampleBuffer outBuffer,
int offset,
int count)
Main read method. |
void |
reset()
|
void |
setConversionAlgorithm(int algo)
|
void |
setTargetSampleRate(float sr)
|
long |
skip(long nSkip)
|
| Methods inherited from class javax.sound.sampled.AudioInputStream |
|---|
getFormat, getFrameLength |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final int SAMPLE_AND_HOLD
public static final int LINEAR_INTERPOLATION
public static final int RESAMPLE
| Constructor Detail |
|---|
public SampleRateConversionProvider.SampleRateConverterStream(AudioInputStream sourceStream,
AudioFormat targetFormat)
public SampleRateConversionProvider.SampleRateConverterStream(FloatSampleInput sourceInput,
AudioFormat targetFormat,
long frameLength)
| Method Detail |
|---|
public int getChannels()
getChannels in interface FloatSampleInputpublic float getSampleRate()
getSampleRate in interface FloatSampleInputpublic boolean isDone()
FloatSampleInput
isDone in interface FloatSampleInputpublic void read(FloatSampleBuffer outBuffer)
FloatSampleInputThe buffer's channel count and sample rate may not be changed by the implementation of this method.
read in interface FloatSampleInputoutBuffer - the buffer to be filled
public void read(FloatSampleBuffer outBuffer,
int offset,
int count)
conversionAlgorithm. At most
outBuffer.getSampleCount() are converted. In general, if
outBuffer.getSampleCount()) is less after processing this function,
then it is an indicator that it was the last block to be processed.
read in interface FloatSampleInputoutBuffer - the buffer that the converted samples will be
written to.offset - the start index, in samples, where to start filling the
buffercount - the number fo samples to fill into the buffer
java.lang.IllegalArgumentException - when outBuffer's channel count does
not matchsetConversionAlgorithm(int)public int getFrameSize()
public int getSourceFrameSize()
public int read()
throws java.io.IOException
read in class AudioInputStreamjava.io.IOException
public int read(byte[] abData)
throws java.io.IOException
read in class AudioInputStreamjava.io.IOExceptionread(byte[], int, int)
public int read(byte[] abData,
int nOffset,
int nLength)
throws java.io.IOException
read in class AudioInputStreamjava.io.IOException
public long skip(long nSkip)
throws java.io.IOException
skip in class AudioInputStreamjava.io.IOException
public int available()
throws java.io.IOException
available in class AudioInputStreamjava.io.IOExceptionpublic void mark(int readlimit)
mark in class AudioInputStream
public void reset()
throws java.io.IOException
reset in class AudioInputStreamjava.io.IOExceptionpublic boolean markSupported()
markSupported in class AudioInputStreampublic void close()
close in interface java.io.Closeableclose in class AudioInputStreampublic boolean isClosed()
public void flush()
public void setTargetSampleRate(float sr)
public void setConversionAlgorithm(int algo)
public float getTargetSampleRate()
public int getConversionAlgorithm()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||