java.lang.Object
org.monte.media.av.AbstractCodec
org.monte.media.av.codec.audio.AbstractAudioCodec
org.monte.media.av.codec.audio.AbstractPCMAudioCodec
- All Implemented Interfaces:
Codec
- Direct Known Subclasses:
AVIPCMAudioCodec,QuickTimePCMAudioCodec
AbstractPCMAudioCodec performs sign conversion, endian conversion and
quantization conversion of PCM audio data. Does not perform sampling rate conversion or channel conversion.
- Author:
- Werner Randelshofer
-
Field Summary
Fields inherited from class org.monte.media.av.AbstractCodec
inputFormat, inputFormats, name, outputFormat, outputFormatsFields inherited from interface org.monte.media.av.Codec
CODEC_FAILED, CODEC_INPUT_NOT_CONSUMED, CODEC_OK, CODEC_OUTPUT_NOT_FILLED -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedAbstractPCMAudioCodec(Format[] supportedInputAndOutputFormats) protectedAbstractPCMAudioCodec(Format[] supportedInputFormats, Format[] supportedOutputFormats) -
Method Summary
Modifier and TypeMethodDescriptionintPerforms the media processing defined by this codec.protected void16-bit audio data signed in and unsigned out.protected voidSigned 16-bit audio data in, unsigned 8-bit out.protected voidwrite16To16(ImageInputStream in, ImageOutputStream out) 16-bit audio data in and out.protected void16-bit audio data unsigned in and signed out.protected voidwrite8STo8S(ImageInputStream in, ImageOutputStream out, boolean fixSilenceBug) Signed 8-bit audio data in, signed out.protected voidwrite8STo8U(ImageInputStream in, ImageOutputStream out, boolean fixSilenceBug) Signed 8-bit audio data in, unsigned out.protected voidwrite8To8(ImageInputStream in, ImageOutputStream out) 8-bit audio data in and out.protected voidwrite8UTo8S(ImageInputStream in, ImageOutputStream out, boolean fixSilenceBug) Unsigned 8-bit audio data in, signed out.Methods inherited from class org.monte.media.av.AbstractCodec
getInputFormat, getInputFormats, getName, getOutputFormat, getOutputFormats, reset, setInputFormat, setOutputFormat, toString
-
Constructor Details
-
AbstractPCMAudioCodec
public AbstractPCMAudioCodec() -
AbstractPCMAudioCodec
-
AbstractPCMAudioCodec
-
-
Method Details
-
process
Description copied from interface:CodecPerforms the media processing defined by this codec.Copies the data from the input buffer into the output buffer.
- Returns:
- A combination of processing flags.
-
write16To16
16-bit audio data in and out. No sign conversion. Endian conversion is performed by the stream objects.- Throws:
IOException
-
write16UTo16S
16-bit audio data unsigned in and signed out. Endian conversion is performed by the stream objects.- Throws:
IOException
-
write16STo16U
16-bit audio data signed in and unsigned out. Endian conversion is performed by the stream objects.- Throws:
IOException
-
write16STo8U
Signed 16-bit audio data in, unsigned 8-bit out. Endian conversion is performed by the stream objects.- Throws:
IOException
-
write8To8
8-bit audio data in and out. No sign conversion.- Throws:
IOException
-
write8UTo8S
protected void write8UTo8S(ImageInputStream in, ImageOutputStream out, boolean fixSilenceBug) throws IOException Unsigned 8-bit audio data in, signed out.- Throws:
IOException
-
write8STo8U
protected void write8STo8U(ImageInputStream in, ImageOutputStream out, boolean fixSilenceBug) throws IOException Signed 8-bit audio data in, unsigned out.- Throws:
IOException
-
write8STo8S
protected void write8STo8S(ImageInputStream in, ImageOutputStream out, boolean fixSilenceBug) throws IOException Signed 8-bit audio data in, signed out.- Throws:
IOException
-