下面列出了javax.sound.sampled.AudioFormat#toString ( ) 实例代码,或者点击链接到github查看源代码,也可以在右侧发表评论。
public AudioInputStream getAudioInputStream(AudioFormat targetFormat,
AudioFloatInputStream sourceStream) {
if (!isConversionSupported(targetFormat, sourceStream.getFormat()))
throw new IllegalArgumentException("Unsupported conversion: "
+ sourceStream.getFormat().toString() + " to "
+ targetFormat.toString());
if (targetFormat.getChannels() != sourceStream.getFormat()
.getChannels())
sourceStream = new AudioFloatInputStreamChannelMixer(sourceStream,
targetFormat.getChannels());
if (Math.abs(targetFormat.getSampleRate()
- sourceStream.getFormat().getSampleRate()) > 0.000001)
sourceStream = new AudioFloatInputStreamResampler(sourceStream,
targetFormat);
return new AudioInputStream(new AudioFloatFormatConverterInputStream(
targetFormat, sourceStream), targetFormat, sourceStream
.getFrameLength());
}
public AudioInputStream getAudioInputStream(AudioFormat targetFormat,
AudioFloatInputStream sourceStream) {
if (!isConversionSupported(targetFormat, sourceStream.getFormat()))
throw new IllegalArgumentException("Unsupported conversion: "
+ sourceStream.getFormat().toString() + " to "
+ targetFormat.toString());
if (targetFormat.getChannels() != sourceStream.getFormat()
.getChannels())
sourceStream = new AudioFloatInputStreamChannelMixer(sourceStream,
targetFormat.getChannels());
if (Math.abs(targetFormat.getSampleRate()
- sourceStream.getFormat().getSampleRate()) > 0.000001)
sourceStream = new AudioFloatInputStreamResampler(sourceStream,
targetFormat);
return new AudioInputStream(new AudioFloatFormatConverterInputStream(
targetFormat, sourceStream), targetFormat, sourceStream
.getFrameLength());
}
@Override
public AudioInputStream getAudioInputStream(AudioFormat targetFormat,
AudioInputStream sourceStream) {
if (!isConversionSupported(targetFormat, sourceStream.getFormat()))
throw new IllegalArgumentException("Unsupported conversion: "
+ sourceStream.getFormat().toString() + " to "
+ targetFormat.toString());
return getAudioInputStream(targetFormat, AudioFloatInputStream
.getInputStream(sourceStream));
}
public AudioInputStream getAudioInputStream(AudioFormat targetFormat,
AudioInputStream sourceStream) {
if (!isConversionSupported(targetFormat, sourceStream.getFormat()))
throw new IllegalArgumentException("Unsupported conversion: "
+ sourceStream.getFormat().toString() + " to "
+ targetFormat.toString());
return getAudioInputStream(targetFormat, AudioFloatInputStream
.getInputStream(sourceStream));
}
public AudioInputStream getAudioInputStream(AudioFormat targetFormat,
AudioInputStream sourceStream) {
if (!isConversionSupported(targetFormat, sourceStream.getFormat()))
throw new IllegalArgumentException("Unsupported conversion: "
+ sourceStream.getFormat().toString() + " to "
+ targetFormat.toString());
return getAudioInputStream(targetFormat, AudioFloatInputStream
.getInputStream(sourceStream));
}
public AudioInputStream getAudioInputStream(AudioFormat targetFormat,
AudioInputStream sourceStream) {
if (!isConversionSupported(targetFormat, sourceStream.getFormat()))
throw new IllegalArgumentException("Unsupported conversion: "
+ sourceStream.getFormat().toString() + " to "
+ targetFormat.toString());
return getAudioInputStream(targetFormat, AudioFloatInputStream
.getInputStream(sourceStream));
}
@Override
public AudioInputStream getAudioInputStream(AudioFormat targetFormat, AudioInputStream sourceStream){
if (!isConversionSupported(targetFormat, sourceStream.getFormat()))
throw new IllegalArgumentException("Unsupported conversion: "
+ sourceStream.getFormat().toString() + " to "
+ targetFormat.toString());
return getConvertedStream( targetFormat, sourceStream );
}
@Override
public AudioInputStream getAudioInputStream(AudioFormat targetFormat, AudioInputStream sourceStream){
if (!isConversionSupported(targetFormat, sourceStream.getFormat()))
throw new IllegalArgumentException("Unsupported conversion: "
+ sourceStream.getFormat().toString() + " to "
+ targetFormat.toString());
return getConvertedStream( targetFormat, sourceStream );
}
public AudioInputStream getAudioInputStream(AudioFormat targetFormat,
AudioInputStream sourceStream) {
if (!isConversionSupported(targetFormat, sourceStream.getFormat()))
throw new IllegalArgumentException("Unsupported conversion: "
+ sourceStream.getFormat().toString() + " to "
+ targetFormat.toString());
return getAudioInputStream(targetFormat, AudioFloatInputStream
.getInputStream(sourceStream));
}
UlawCodecStream(AudioInputStream stream, AudioFormat outputFormat) {
super(stream, outputFormat, AudioSystem.NOT_SPECIFIED);
AudioFormat inputFormat = stream.getFormat();
// throw an IllegalArgumentException if not ok
if (!(isConversionSupported(outputFormat, inputFormat))) {
throw new IllegalArgumentException("Unsupported conversion: " + inputFormat.toString() + " to " + outputFormat.toString());
}
//$$fb 2002-07-18: fix for 4714846: JavaSound ULAW (8-bit) encoder erroneously depends on endian-ness
boolean PCMIsBigEndian;
// determine whether we are encoding or decoding
if (AudioFormat.Encoding.ULAW.equals(inputFormat.getEncoding())) {
encode = false;
encodeFormat = inputFormat;
decodeFormat = outputFormat;
PCMIsBigEndian = outputFormat.isBigEndian();
} else {
encode = true;
encodeFormat = outputFormat;
decodeFormat = inputFormat;
PCMIsBigEndian = inputFormat.isBigEndian();
tempBuffer = new byte[tempBufferSize];
}
// setup tables according to byte order
if (PCMIsBigEndian) {
tabByte1 = ULAW_TABH;
tabByte2 = ULAW_TABL;
highByte = 0;
lowByte = 1;
} else {
tabByte1 = ULAW_TABL;
tabByte2 = ULAW_TABH;
highByte = 1;
lowByte = 0;
}
// set the AudioInputStream length in frames if we know it
if (stream instanceof AudioInputStream) {
frameLength = ((AudioInputStream)stream).getFrameLength();
}
// set framePos to zero
framePos = 0;
frameSize = inputFormat.getFrameSize();
if (frameSize == AudioSystem.NOT_SPECIFIED) {
frameSize = 1;
}
}
public void open(AudioFormat format, byte[] data, int offset, int bufferSize)
throws LineUnavailableException {
synchronized (control_mutex) {
if (isOpen()) {
throw new IllegalStateException(
"Clip is already open with format " + getFormat()
+ " and frame lengh of " + getFrameLength());
}
if (AudioFloatConverter.getConverter(format) == null)
throw new IllegalArgumentException("Invalid format : "
+ format.toString());
if (bufferSize % format.getFrameSize() != 0)
throw new IllegalArgumentException(
"Buffer size does not represent an integral number of sample frames!");
if (data != null) {
this.data = Arrays.copyOf(data, data.length);
}
this.offset = offset;
this.bufferSize = bufferSize;
this.format = format;
this.framesize = format.getFrameSize();
loopstart = 0;
loopend = -1;
loop_sg = true;
if (!mixer.isOpen()) {
mixer.open();
mixer.implicitOpen = true;
}
outputformat = mixer.getFormat();
out_nrofchannels = outputformat.getChannels();
in_nrofchannels = format.getChannels();
open = true;
mixer.getMainMixer().openLine(this);
}
}
public void open(AudioFormat format, byte[] data, int offset, int bufferSize)
throws LineUnavailableException {
synchronized (control_mutex) {
if (isOpen()) {
throw new IllegalStateException(
"Clip is already open with format " + getFormat()
+ " and frame lengh of " + getFrameLength());
}
if (AudioFloatConverter.getConverter(format) == null)
throw new IllegalArgumentException("Invalid format : "
+ format.toString());
if (bufferSize % format.getFrameSize() != 0)
throw new IllegalArgumentException(
"Buffer size does not represent an integral number of sample frames!");
if (data != null) {
this.data = Arrays.copyOf(data, data.length);
}
this.offset = offset;
this.bufferSize = bufferSize;
this.format = format;
this.framesize = format.getFrameSize();
loopstart = 0;
loopend = -1;
loop_sg = true;
if (!mixer.isOpen()) {
mixer.open();
mixer.implicitOpen = true;
}
outputformat = mixer.getFormat();
out_nrofchannels = outputformat.getChannels();
in_nrofchannels = format.getChannels();
open = true;
mixer.getMainMixer().openLine(this);
}
}
UlawCodecStream(AudioInputStream stream, AudioFormat outputFormat) {
super(stream, outputFormat, AudioSystem.NOT_SPECIFIED);
AudioFormat inputFormat = stream.getFormat();
// throw an IllegalArgumentException if not ok
if (!(isConversionSupported(outputFormat, inputFormat))) {
throw new IllegalArgumentException("Unsupported conversion: " + inputFormat.toString() + " to " + outputFormat.toString());
}
//$$fb 2002-07-18: fix for 4714846: JavaSound ULAW (8-bit) encoder erroneously depends on endian-ness
boolean PCMIsBigEndian;
// determine whether we are encoding or decoding
if (AudioFormat.Encoding.ULAW.equals(inputFormat.getEncoding())) {
encode = false;
encodeFormat = inputFormat;
decodeFormat = outputFormat;
PCMIsBigEndian = outputFormat.isBigEndian();
} else {
encode = true;
encodeFormat = outputFormat;
decodeFormat = inputFormat;
PCMIsBigEndian = inputFormat.isBigEndian();
tempBuffer = new byte[tempBufferSize];
}
// setup tables according to byte order
if (PCMIsBigEndian) {
tabByte1 = ULAW_TABH;
tabByte2 = ULAW_TABL;
highByte = 0;
lowByte = 1;
} else {
tabByte1 = ULAW_TABL;
tabByte2 = ULAW_TABH;
highByte = 1;
lowByte = 0;
}
// set the AudioInputStream length in frames if we know it
if (stream instanceof AudioInputStream) {
frameLength = ((AudioInputStream)stream).getFrameLength();
}
// set framePos to zero
framePos = 0;
frameSize = inputFormat.getFrameSize();
if (frameSize == AudioSystem.NOT_SPECIFIED) {
frameSize = 1;
}
}
AlawCodecStream(AudioInputStream stream, AudioFormat outputFormat) {
super(stream, outputFormat, -1);
AudioFormat inputFormat = stream.getFormat();
// throw an IllegalArgumentException if not ok
if ( ! (isConversionSupported(outputFormat, inputFormat)) ) {
throw new IllegalArgumentException("Unsupported conversion: " + inputFormat.toString() + " to " + outputFormat.toString());
}
//$$fb 2002-07-18: fix for 4714846: JavaSound ULAW (8-bit) encoder erroneously depends on endian-ness
boolean PCMIsBigEndian;
// determine whether we are encoding or decoding
if (AudioFormat.Encoding.ALAW.equals(inputFormat.getEncoding())) {
encode = false;
encodeFormat = inputFormat;
decodeFormat = outputFormat;
PCMIsBigEndian = outputFormat.isBigEndian();
} else {
encode = true;
encodeFormat = outputFormat;
decodeFormat = inputFormat;
PCMIsBigEndian = inputFormat.isBigEndian();
tempBuffer = new byte[tempBufferSize];
}
if (PCMIsBigEndian) {
tabByte1 = ALAW_TABH;
tabByte2 = ALAW_TABL;
highByte = 0;
lowByte = 1;
} else {
tabByte1 = ALAW_TABL;
tabByte2 = ALAW_TABH;
highByte = 1;
lowByte = 0;
}
// set the AudioInputStream length in frames if we know it
if (stream instanceof AudioInputStream) {
frameLength = ((AudioInputStream)stream).getFrameLength();
}
// set framePos to zero
framePos = 0;
frameSize = inputFormat.getFrameSize();
if( frameSize==AudioSystem.NOT_SPECIFIED ) {
frameSize=1;
}
}
UlawCodecStream(AudioInputStream stream, AudioFormat outputFormat) {
super(stream, outputFormat, AudioSystem.NOT_SPECIFIED);
AudioFormat inputFormat = stream.getFormat();
// throw an IllegalArgumentException if not ok
if (!(isConversionSupported(outputFormat, inputFormat))) {
throw new IllegalArgumentException("Unsupported conversion: " + inputFormat.toString() + " to " + outputFormat.toString());
}
//$$fb 2002-07-18: fix for 4714846: JavaSound ULAW (8-bit) encoder erroneously depends on endian-ness
boolean PCMIsBigEndian;
// determine whether we are encoding or decoding
if (AudioFormat.Encoding.ULAW.equals(inputFormat.getEncoding())) {
encode = false;
encodeFormat = inputFormat;
decodeFormat = outputFormat;
PCMIsBigEndian = outputFormat.isBigEndian();
} else {
encode = true;
encodeFormat = outputFormat;
decodeFormat = inputFormat;
PCMIsBigEndian = inputFormat.isBigEndian();
tempBuffer = new byte[tempBufferSize];
}
// setup tables according to byte order
if (PCMIsBigEndian) {
tabByte1 = ULAW_TABH;
tabByte2 = ULAW_TABL;
highByte = 0;
lowByte = 1;
} else {
tabByte1 = ULAW_TABL;
tabByte2 = ULAW_TABH;
highByte = 1;
lowByte = 0;
}
// set the AudioInputStream length in frames if we know it
if (stream instanceof AudioInputStream) {
frameLength = ((AudioInputStream)stream).getFrameLength();
}
// set framePos to zero
framePos = 0;
frameSize = inputFormat.getFrameSize();
if (frameSize == AudioSystem.NOT_SPECIFIED) {
frameSize = 1;
}
}
AlawCodecStream(AudioInputStream stream, AudioFormat outputFormat) {
super(stream, outputFormat, -1);
AudioFormat inputFormat = stream.getFormat();
// throw an IllegalArgumentException if not ok
if ( ! (isConversionSupported(outputFormat, inputFormat)) ) {
throw new IllegalArgumentException("Unsupported conversion: " + inputFormat.toString() + " to " + outputFormat.toString());
}
//$$fb 2002-07-18: fix for 4714846: JavaSound ULAW (8-bit) encoder erroneously depends on endian-ness
boolean PCMIsBigEndian;
// determine whether we are encoding or decoding
if (AudioFormat.Encoding.ALAW.equals(inputFormat.getEncoding())) {
encode = false;
encodeFormat = inputFormat;
decodeFormat = outputFormat;
PCMIsBigEndian = outputFormat.isBigEndian();
} else {
encode = true;
encodeFormat = outputFormat;
decodeFormat = inputFormat;
PCMIsBigEndian = inputFormat.isBigEndian();
tempBuffer = new byte[tempBufferSize];
}
if (PCMIsBigEndian) {
tabByte1 = ALAW_TABH;
tabByte2 = ALAW_TABL;
highByte = 0;
lowByte = 1;
} else {
tabByte1 = ALAW_TABL;
tabByte2 = ALAW_TABH;
highByte = 1;
lowByte = 0;
}
// set the AudioInputStream length in frames if we know it
if (stream instanceof AudioInputStream) {
frameLength = ((AudioInputStream)stream).getFrameLength();
}
// set framePos to zero
framePos = 0;
frameSize = inputFormat.getFrameSize();
if( frameSize==AudioSystem.NOT_SPECIFIED ) {
frameSize=1;
}
}
AlawCodecStream(AudioInputStream stream, AudioFormat outputFormat) {
super(stream, outputFormat, -1);
AudioFormat inputFormat = stream.getFormat();
// throw an IllegalArgumentException if not ok
if ( ! (isConversionSupported(outputFormat, inputFormat)) ) {
throw new IllegalArgumentException("Unsupported conversion: " + inputFormat.toString() + " to " + outputFormat.toString());
}
//$$fb 2002-07-18: fix for 4714846: JavaSound ULAW (8-bit) encoder erroneously depends on endian-ness
boolean PCMIsBigEndian;
// determine whether we are encoding or decoding
if (AudioFormat.Encoding.ALAW.equals(inputFormat.getEncoding())) {
encode = false;
encodeFormat = inputFormat;
decodeFormat = outputFormat;
PCMIsBigEndian = outputFormat.isBigEndian();
} else {
encode = true;
encodeFormat = outputFormat;
decodeFormat = inputFormat;
PCMIsBigEndian = inputFormat.isBigEndian();
tempBuffer = new byte[tempBufferSize];
}
if (PCMIsBigEndian) {
tabByte1 = ALAW_TABH;
tabByte2 = ALAW_TABL;
highByte = 0;
lowByte = 1;
} else {
tabByte1 = ALAW_TABL;
tabByte2 = ALAW_TABH;
highByte = 1;
lowByte = 0;
}
// set the AudioInputStream length in frames if we know it
if (stream instanceof AudioInputStream) {
frameLength = ((AudioInputStream)stream).getFrameLength();
}
// set framePos to zero
framePos = 0;
frameSize = inputFormat.getFrameSize();
if( frameSize==AudioSystem.NOT_SPECIFIED ) {
frameSize=1;
}
}
PCMtoPCMCodecStream(AudioInputStream stream, AudioFormat outputFormat) {
super(stream, outputFormat, -1);
int sampleSizeInBits = 0;
AudioFormat.Encoding inputEncoding = null;
AudioFormat.Encoding outputEncoding = null;
boolean inputIsBigEndian;
boolean outputIsBigEndian;
AudioFormat inputFormat = stream.getFormat();
// throw an IllegalArgumentException if not ok
if ( ! (isConversionSupported(inputFormat, outputFormat)) ) {
throw new IllegalArgumentException("Unsupported conversion: " + inputFormat.toString() + " to " + outputFormat.toString());
}
inputEncoding = inputFormat.getEncoding();
outputEncoding = outputFormat.getEncoding();
inputIsBigEndian = inputFormat.isBigEndian();
outputIsBigEndian = outputFormat.isBigEndian();
sampleSizeInBits = inputFormat.getSampleSizeInBits();
sampleSizeInBytes = sampleSizeInBits/8;
// determine conversion to perform
if( sampleSizeInBits==8 ) {
if( AudioFormat.Encoding.PCM_UNSIGNED.equals(inputEncoding) &&
AudioFormat.Encoding.PCM_SIGNED.equals(outputEncoding) ) {
conversionType = PCM_SWITCH_SIGNED_8BIT;
if(Printer.debug) Printer.debug("PCMtoPCMCodecStream: conversionType = PCM_SWITCH_SIGNED_8BIT");
} else if( AudioFormat.Encoding.PCM_SIGNED.equals(inputEncoding) &&
AudioFormat.Encoding.PCM_UNSIGNED.equals(outputEncoding) ) {
conversionType = PCM_SWITCH_SIGNED_8BIT;
if(Printer.debug) Printer.debug("PCMtoPCMCodecStream: conversionType = PCM_SWITCH_SIGNED_8BIT");
}
} else {
if( inputEncoding.equals(outputEncoding) && (inputIsBigEndian != outputIsBigEndian) ) {
conversionType = PCM_SWITCH_ENDIAN;
if(Printer.debug) Printer.debug("PCMtoPCMCodecStream: conversionType = PCM_SWITCH_ENDIAN");
} else if (AudioFormat.Encoding.PCM_UNSIGNED.equals(inputEncoding) && !inputIsBigEndian &&
AudioFormat.Encoding.PCM_SIGNED.equals(outputEncoding) && outputIsBigEndian) {
conversionType = PCM_UNSIGNED_LE2SIGNED_BE;
if(Printer.debug) Printer.debug("PCMtoPCMCodecStream: conversionType = PCM_UNSIGNED_LE2SIGNED_BE");
} else if (AudioFormat.Encoding.PCM_SIGNED.equals(inputEncoding) && !inputIsBigEndian &&
AudioFormat.Encoding.PCM_UNSIGNED.equals(outputEncoding) && outputIsBigEndian) {
conversionType = PCM_SIGNED_LE2UNSIGNED_BE;
if(Printer.debug) Printer.debug("PCMtoPCMCodecStream: conversionType = PCM_SIGNED_LE2UNSIGNED_BE");
} else if (AudioFormat.Encoding.PCM_UNSIGNED.equals(inputEncoding) && inputIsBigEndian &&
AudioFormat.Encoding.PCM_SIGNED.equals(outputEncoding) && !outputIsBigEndian) {
conversionType = PCM_UNSIGNED_BE2SIGNED_LE;
if(Printer.debug) Printer.debug("PCMtoPCMCodecStream: conversionType = PCM_UNSIGNED_BE2SIGNED_LE");
} else if (AudioFormat.Encoding.PCM_SIGNED.equals(inputEncoding) && inputIsBigEndian &&
AudioFormat.Encoding.PCM_UNSIGNED.equals(outputEncoding) && !outputIsBigEndian) {
conversionType = PCM_SIGNED_BE2UNSIGNED_LE;
if(Printer.debug) Printer.debug("PCMtoPCMCodecStream: conversionType = PCM_SIGNED_BE2UNSIGNED_LE");
}
}
// set the audio stream length in frames if we know it
frameSize = inputFormat.getFrameSize();
if( frameSize == AudioSystem.NOT_SPECIFIED ) {
frameSize=1;
}
if( stream instanceof AudioInputStream ) {
frameLength = stream.getFrameLength();
} else {
frameLength = AudioSystem.NOT_SPECIFIED;
}
// set framePos to zero
framePos = 0;
}
UlawCodecStream(AudioInputStream stream, AudioFormat outputFormat) {
super(stream, outputFormat, AudioSystem.NOT_SPECIFIED);
AudioFormat inputFormat = stream.getFormat();
// throw an IllegalArgumentException if not ok
if (!(isConversionSupported(outputFormat, inputFormat))) {
throw new IllegalArgumentException("Unsupported conversion: " + inputFormat.toString() + " to " + outputFormat.toString());
}
//$$fb 2002-07-18: fix for 4714846: JavaSound ULAW (8-bit) encoder erroneously depends on endian-ness
boolean PCMIsBigEndian;
// determine whether we are encoding or decoding
if (AudioFormat.Encoding.ULAW.equals(inputFormat.getEncoding())) {
encode = false;
encodeFormat = inputFormat;
decodeFormat = outputFormat;
PCMIsBigEndian = outputFormat.isBigEndian();
} else {
encode = true;
encodeFormat = outputFormat;
decodeFormat = inputFormat;
PCMIsBigEndian = inputFormat.isBigEndian();
tempBuffer = new byte[tempBufferSize];
}
// setup tables according to byte order
if (PCMIsBigEndian) {
tabByte1 = ULAW_TABH;
tabByte2 = ULAW_TABL;
highByte = 0;
lowByte = 1;
} else {
tabByte1 = ULAW_TABL;
tabByte2 = ULAW_TABH;
highByte = 1;
lowByte = 0;
}
// set the AudioInputStream length in frames if we know it
if (stream instanceof AudioInputStream) {
frameLength = ((AudioInputStream)stream).getFrameLength();
}
// set framePos to zero
framePos = 0;
frameSize = inputFormat.getFrameSize();
if (frameSize == AudioSystem.NOT_SPECIFIED) {
frameSize = 1;
}
}
AlawCodecStream(AudioInputStream stream, AudioFormat outputFormat) {
super(stream, outputFormat, -1);
AudioFormat inputFormat = stream.getFormat();
// throw an IllegalArgumentException if not ok
if ( ! (isConversionSupported(outputFormat, inputFormat)) ) {
throw new IllegalArgumentException("Unsupported conversion: " + inputFormat.toString() + " to " + outputFormat.toString());
}
//$$fb 2002-07-18: fix for 4714846: JavaSound ULAW (8-bit) encoder erroneously depends on endian-ness
boolean PCMIsBigEndian;
// determine whether we are encoding or decoding
if (AudioFormat.Encoding.ALAW.equals(inputFormat.getEncoding())) {
encode = false;
encodeFormat = inputFormat;
decodeFormat = outputFormat;
PCMIsBigEndian = outputFormat.isBigEndian();
} else {
encode = true;
encodeFormat = outputFormat;
decodeFormat = inputFormat;
PCMIsBigEndian = inputFormat.isBigEndian();
tempBuffer = new byte[tempBufferSize];
}
if (PCMIsBigEndian) {
tabByte1 = ALAW_TABH;
tabByte2 = ALAW_TABL;
highByte = 0;
lowByte = 1;
} else {
tabByte1 = ALAW_TABL;
tabByte2 = ALAW_TABH;
highByte = 1;
lowByte = 0;
}
// set the AudioInputStream length in frames if we know it
if (stream instanceof AudioInputStream) {
frameLength = ((AudioInputStream)stream).getFrameLength();
}
// set framePos to zero
framePos = 0;
frameSize = inputFormat.getFrameSize();
if( frameSize==AudioSystem.NOT_SPECIFIED ) {
frameSize=1;
}
}