/** Initialise the vorbis decoding */ private void initVorbis () { syncState.init(); }
/** * Copys data from input stream to syncState. */ private void fetchData() throws IOException { if (!eos) { // copy 4096 bytes from compressed stream to syncState. int bufferIndex = syncState.buffer(4096); if (bufferIndex < 0) { eos = true; return; } int bytes = in.read(syncState.data, bufferIndex, 4096); syncState.wrote(bytes); if (bytes == 0) { eos = true; } } }
int index = syncState.buffer(BUFFER_SIZE); if (index == -1) return false; syncState.wrote(bytes); if (syncState.pageout(page) != 1) { streamState.init(page.serialno()); if (streamState.pagein(page) < 0) { if (streamState.packetout(packet) != 1) { while (i < 2) { while (i < 2) { int result = syncState.pageout(page); if (result == 0) break; // Need more data streamState.pagein(page); // we can ignore any errors here result = streamState.packetout(packet); if (result == 0) break; if (result == -1) { index = syncState.buffer(BUFFER_SIZE); if (index == -1) return false; buffer = syncState.data; syncState.wrote(bytes);
int result = syncState.pageout(page); streamState.pagein(page); // can safely ignore errors at result = streamState.packetout(packet); if (page.eos() != 0) { endOfBitStream = true; int index = syncState.buffer(BUFFER_SIZE); if (index >= 0) { buffer = syncState.data; bytes = 0; syncState.wrote(bytes); if (bytes == 0) { endOfBitStream = true; streamState.clear(); syncState.clear(); endOfStream = true;
public void write(byte[] s){ for(int i=0; i<s.length; i++){ if(s[i]==0) break; write(s[i], 8); } }
public void read(byte[] s, int bytes){ int i=0; while(bytes--!=0){ s[i++]=(byte)(read(8)); } }
public int pageout(Page og){ if((e_o_s!=0&&lacing_fill!=0)|| /* 'were done, now flush' case */ body_fill-body_returned>4096|| /* 'page nominal size' case */ lacing_fill>=255|| /* 'segment table full' case */ (lacing_fill!=0&&b_o_s==0)){ /* 'initial header page' case */ return flush(og); } return 0; }
int index = syncState.buffer(BUFFER_SIZE); if (index == -1) return false; syncState.wrote(bytes); if (syncState.pageout(page) != 1) { streamState.init(page.serialno()); if (streamState.pagein(page) < 0) { if (streamState.packetout(packet) != 1) { while (i < 2) { while (i < 2) { int result = syncState.pageout(page); if (result == 0) break; // Need more data streamState.pagein(page); // we can ignore any errors here result = streamState.packetout(packet); if (result == 0) break; if (result == -1) { index = syncState.buffer(BUFFER_SIZE); if (index == -1) return false; buffer = syncState.data; syncState.wrote(bytes);
int result = syncState.pageout(page); streamState.pagein(page); // can safely ignore errors at result = streamState.packetout(packet); if (page.eos() != 0) { endOfBitStream = true; int index = syncState.buffer(BUFFER_SIZE); if (index >= 0) { buffer = syncState.data; bytes = 0; syncState.wrote(bytes); if (bytes == 0) { endOfBitStream = true; streamState.clear(); syncState.clear(); endOfStream = true;
/** Initialise the vorbis decoding */ private void initVorbis () { syncState.init(); }
public void write(byte[] s){ for(int i=0; i<s.length; i++){ if(s[i]==0) break; write(s[i], 8); } }
int index = syncState.buffer(BUFFER_SIZE); if (index == -1) return false; syncState.wrote(bytes); if (syncState.pageout(page) != 1) { streamState.init(page.serialno()); if (streamState.pagein(page) < 0) { if (streamState.packetout(packet) != 1) { while (i < 2) { while (i < 2) { int result = syncState.pageout(page); if (result == 0) break; // Need more data streamState.pagein(page); // we can ignore any errors here result = streamState.packetout(packet); if (result == 0) break; if (result == -1) { index = syncState.buffer(BUFFER_SIZE); if (index == -1) return false; buffer = syncState.data; syncState.wrote(bytes);
int result = syncState.pageout(page); streamState.pagein(page); // can safely ignore errors at result = streamState.packetout(packet); if (page.eos() != 0) { endOfBitStream = true; int index = syncState.buffer(BUFFER_SIZE); if (index >= 0) { buffer = syncState.data; bytes = 0; syncState.wrote(bytes); if (bytes == 0) { endOfBitStream = true; streamState.clear(); syncState.clear(); endOfStream = true;
/** Initialise the vorbis decoding */ private void initVorbis () { syncState.init(); }
int index = syncState.buffer(BUFFER_SIZE); if (index == -1) return false; syncState.wrote(bytes); if (syncState.pageout(page) != 1) { streamState.init(page.serialno()); if (streamState.pagein(page) < 0) { if (streamState.packetout(packet) != 1) { while (i < 2) { while (i < 2) { int result = syncState.pageout(page); if (result == 0) break; // Need more data streamState.pagein(page); // we can ignore any errors here result = streamState.packetout(packet); if (result == 0) break; if (result == -1) { index = syncState.buffer(BUFFER_SIZE); if (index == -1) return false; buffer = syncState.data; syncState.wrote(bytes);
int result = syncState.pageout(page); streamState.pagein(page); // can safely ignore errors at result = streamState.packetout(packet); if (page.eos() != 0) { endOfBitStream = true; int index = syncState.buffer(BUFFER_SIZE); if (index >= 0) { buffer = syncState.data; bytes = 0; syncState.wrote(bytes); if (bytes == 0) { endOfBitStream = true; streamState.clear(); syncState.clear(); endOfStream = true;
/** Initialise the vorbis decoding */ private void initVorbis () { syncState.init(); }
syncState.init(); int bufferIndex = syncState.buffer(4096); byte[] buffer = syncState.data; int bytes = in.read(buffer, bufferIndex, 4096); syncState.wrote(bytes); if (syncState.pageout(page) != 1) { streamState.init(page.serialno()); if (streamState.pagein(page) < 0) { if (streamState.packetout(packet) != 1) { while (i < 2) { while (i < 2) { int result = syncState.pageout(page); if (result == 0) { break; // Need more data streamState.pagein(page); // we can ignore any errors here result = streamState.packetout(packet); if (result == 0) { break; bufferIndex = syncState.buffer(4096); buffer = syncState.data;