Class SXMSampleBufferRateConverter
java.lang.Object
com.io7m.jsamplebuffer.xmedia.internal.SXMSampleBufferRateConverter
- All Implemented Interfaces:
SampleBufferRateConverterType
public final class SXMSampleBufferRateConverter
extends Object
implements SampleBufferRateConverterType
An implementation of a sample rate converter that uses
javax.sound
to perform the resampling.-
Constructor Summary
ConstructorDescriptionAn implementation of a sample rate converter that usesjavax.sound
to perform the resampling. -
Method Summary
Modifier and TypeMethodDescriptionconvert
(SampleBufferFactoryType sampleBuffers, SampleBufferType buffer, double sampleRate) Convert the given buffer to the target sample rate (returning a new buffer).
-
Constructor Details
-
SXMSampleBufferRateConverter
public SXMSampleBufferRateConverter()An implementation of a sample rate converter that usesjavax.sound
to perform the resampling.
-
-
Method Details
-
convert
public SampleBufferType convert(SampleBufferFactoryType sampleBuffers, SampleBufferType buffer, double sampleRate) throws SampleBufferException Description copied from interface:SampleBufferRateConverterType
Convert the given buffer to the target sample rate (returning a new buffer).- Specified by:
convert
in interfaceSampleBufferRateConverterType
- Parameters:
sampleBuffers
- A factory of sample buffersbuffer
- The source target buffersampleRate
- The target sample rate- Returns:
- A new buffer containing the resampled contents of
buffer
- Throws:
SampleBufferException
- On errors
-