public InputStream pcmstream() {
	return(new InputStream() {
		private byte[] buf;
		private int bufp;
		
		private boolean convert() throws IOException {
		    float[][] inb = decode();
		    if(inb == null) {
			buf = new byte[0];
			return(false);
		    }
		    buf = new byte[2 * chn * inb[0].length];
		    int p = 0;
		    for(int i = 0; i < inb[0].length; i++) {
			for(int c = 0; c < chn; c++) {
			    int s = (int)(inb[c][i] * 32767);
			    buf[p++] = (byte)s;
			    buf[p++] = (byte)(s >> 8);
			}
		    }
		    bufp = 0;
		    return(true);
		}

		public int read() throws IOException {
		    byte[] rb = new byte[1];
		    int ret;
		    do {
			ret = read(rb);
			if(ret < 0)
			    return(-1);
		    } while(ret == 0);
		    return(rb[0]);
		}
    
		public int read(byte[] dst, int off, int len) throws IOException {
		    if((buf == null) && !convert())
			return(-1);
		    if(buf.length - bufp < len)
			len = buf.length - bufp;
		    System.arraycopy(buf, bufp, dst, off, len);
		    if((bufp += len) == buf.length)
			buf = null;
		    return(len);
		}
    
		public void close() throws IOException {
		    VorbisStream.this.close();
		}
	    });
    }