/**
* Read a 32-bit header from the bitstream.
*/
- void read_header(Bitstream stream, Crc16[] crcp) throws BitstreamException {
- System.out.print("READ_HEADER_ST");
+ int read_header(Bitstream stream, Crc16[] crcp) throws BitstreamException {
int headerstring;
int channel_bitrate;
boolean sync = false;
do {
- System.out.println("DO!");
headerstring = stream.syncHeader(syncmode);
+ if(headerstring==-1){
+ return -1;
+ }
_headerstring = headerstring; // E.B
if (syncmode == Bitstream.INITIAL_SYNC) {
h_version = ((headerstring >>> 19) & 1);
} else {
stream.unreadFrame();
}
- System.out.println("do");
} while (!sync);
stream.parse_frame();
if (h_protection_bit == 0) {
* offset[cf-1] + h_padding_bit; } else { offset[0] = h_padding_bit; }
*/
}
- System.out.print("READ_HEADER_ED");
+ return 0;
}
/**