diff options
author | Tim Terriberry <tterribe@xiph.org> | 2010-08-31 19:10:31 +0000 |
---|---|---|
committer | Tim Terriberry <tterribe@xiph.org> | 2010-08-31 19:10:31 +0000 |
commit | 8886a2805fc107489912f8c500db3373e04a316d (patch) | |
tree | 42854e1ade8a2b627c52f2482bf27793054c0523 /synthesis.c | |
parent | 7125eb6381e57436db1c5a2d7c4e52091c37e95c (diff) | |
download | tremor-8886a2805fc107489912f8c500db3373e04a316d.tar.gz |
Convert Tremor to use libogg instead of its own internal libogg2.
This makes it easier to use Tremor as a drop-in replacement for libvorbis and
reduces code size and overhead for those who don't want to use its built-in
Ogg demuxer.
This commit also backports all of the changes that have accumulated in
libvorbis's vorbisfile implementation, with the exception of halfrate decoding
and cross-lapped seeking.
Those should not be too hard to add if someone really wants them.
git-svn-id: https://svn.xiph.org/trunk/Tremor@17375 0101bb08-14d6-0310-b084-bc0e0c8e3800
Diffstat (limited to 'synthesis.c')
-rw-r--r-- | synthesis.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/synthesis.c b/synthesis.c index 1c08752..60d5501 100644 --- a/synthesis.c +++ b/synthesis.c @@ -17,7 +17,7 @@ ********************************************************************/ #include <stdio.h> -#include "ogg.h" +#include <ogg/ogg.h> #include "ivorbiscodec.h" #include "codec_internal.h" #include "registry.h" @@ -34,7 +34,7 @@ static int _vorbis_synthesis1(vorbis_block *vb,ogg_packet *op,int decodep){ /* first things first. Make sure decode is ready */ _vorbis_block_ripcord(vb); - oggpack_readinit(opb,op->packet); + oggpack_readinit(opb,op->packet,op->bytes); /* Check the packet type */ if(oggpack_read(opb,1)!=0){ @@ -86,6 +86,8 @@ int vorbis_synthesis(vorbis_block *vb,ogg_packet *op){ return _vorbis_synthesis1(vb,op,1); } +/* used to track pcm position without actually performing decode. + Useful for sequential 'fast forward' */ int vorbis_synthesis_trackonly(vorbis_block *vb,ogg_packet *op){ return _vorbis_synthesis1(vb,op,0); } @@ -95,7 +97,7 @@ long vorbis_packet_blocksize(vorbis_info *vi,ogg_packet *op){ oggpack_buffer opb; int mode; - oggpack_readinit(&opb,op->packet); + oggpack_readinit(&opb,op->packet,op->bytes); /* Check the packet type */ if(oggpack_read(&opb,1)!=0){ |