/********************************************************************
* *
* THIS FILE IS PART OF THE OggVorbis SOFTWARE CODEC SOURCE CODE. *
* USE, DISTRIBUTION AND REPRODUCTION OF THIS LIBRARY SOURCE IS *
* GOVERNED BY A BSD-STYLE SOURCE LICENSE INCLUDED WITH THIS SOURCE *
* IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING. *
* *
* THE OggVorbis SOURCE CODE IS (C) COPYRIGHT 1994-2002 *
* by the Xiph.Org Foundation http://www.xiph.org/ *
* *
********************************************************************/
import java.io.*;
import org.xiph.libvorbis.*;
import org.xiph.libogg.*;
public class VorbisEncoder {
static vorbisenc encoder;
static ogg_stream_state os; // take physical pages, weld into a logical stream of packets
static ogg_page og; // one Ogg bitstream page. Vorbis packets are inside
static ogg_packet op; // one raw packet of data for decode
static vorbis_info vi; // struct that stores all the static vorbis bitstream settings
static vorbis_comment vc; // struct that stores all the user comments
static vorbis_dsp_state vd; // central working state for the packet->PCM decoder
static vorbis_block vb; // local working space for packet->PCM decode
static int READ = 1024;
static byte[] readbuffer = new byte[READ*4+44];
static int page_count = 0;
static int block_count = 0;
/**
* VorbisEncoder.java
*
* Usage:
* java -cp VorbisEncoder