public void openStream() throws UnsupportedAudioFileException, IOException {
        if (this.isMpeg) {
        	this.mpegInputStream = AudioSystem.getAudioInputStream(this.inStream);
            AudioFormat baseFormat = this.mpegInputStream.getFormat();
            AudioFormat decodedFormat = new AudioFormat(AudioFormat.Encoding.PCM_SIGNED,
                    baseFormat.getSampleRate(), 16, baseFormat.getChannels(),
                    baseFormat.getChannels() * 2, baseFormat.getSampleRate(), false);
            this.audioInputStream = AudioSystem.getAudioInputStream(decodedFormat, this.mpegInputStream);
        } else {
        	this.audioInputStream = AudioSystem.getAudioInputStream(this.inStream);
        }

        this.open = true;
    }