/* * $ProjectName$ * $ProjectRevision$ * ----------------------------------------------------------- * $Id$ * ----------------------------------------------------------- * * $Author$ * * Description: * * Copyright 2002-2003 Tor-Einar Jarnbjo * ----------------------------------------------------------- * * Change History * ----------------------------------------------------------- * $Log$ * Revision 1.1 2005/07/11 15:42:36 hcl * Songdb java version, source. only 1.5 compatible * * Revision 1.1.1.1 2004/04/04 22:09:12 shred * First Import * * Revision 1.2 2003/03/16 01:11:12 jarnbjo * no message * * */ package de.jarnbjo.vorbis; import java.io.*; import de.jarnbjo.util.io.*; class SetupHeader { private static final long HEADER = 0x736962726f76L; // 'vorbis' private CodeBook[] codeBooks; private Floor[] floors; private Residue[] residues; private Mapping[] mappings; private Mode[] modes; public SetupHeader(VorbisStream vorbis, BitInputStream source) throws VorbisFormatException, IOException { if(source.getLong(48)!=HEADER) { throw new VorbisFormatException("The setup header has an illegal leading."); } // read code books int codeBookCount=source.getInt(8)+1; codeBooks=new CodeBook[codeBookCount]; for(int i=0; i