[PD-cvs] externals/pdogg/oggamp~ HISTORY,1.2,1.3 codec.h,1.2,1.3 help-oggamp~.pd,1.2,1.3 oggamp~.c,1.3,1.4 readme,1.2,1.3

x75 at users.sourceforge.net x75 at users.sourceforge.net
Sun Jan 4 13:16:10 CET 2004


Update of /cvsroot/pure-data/externals/pdogg/oggamp~
In directory sc8-pr-cvs1:/tmp/cvs-serv17605/oggamp~

Modified Files:
	HISTORY codec.h help-oggamp~.pd oggamp~.c readme 
Log Message:
recommitting olaf's sources from 0.25


Index: HISTORY
===================================================================
RCS file: /cvsroot/pure-data/externals/pdogg/oggamp~/HISTORY,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** HISTORY	23 Apr 2003 10:36:25 -0000	1.2
--- HISTORY	4 Jan 2004 12:16:07 -0000	1.3
***************
*** 1,40 ****
! Version history of oggamp~ external for pure-data
! 
! v 0.2f (20st july 2002):
! - recompiled with the final 1.0 release of Ogg Vorbis
! 
! v 0.2e (21st june 2002 - stable release):
! - added downsamling
! - cleaned up code a bit
! - added some more info-printout
! - fixed some bugs to make it work correctly on Linux
!   thanks to Oliver Thuns at radiostudio.org
! - now disconnects correctly at end-of-stream (when no
!   chained stream follows)
! - KNOWN BUG: graphic buffer status display might cause ugly
!   printout of Tcl/Tk commands to console window on Linux
!   under some circumstances (e.g. in case server dies)
! 
! v 0.2d (12th june 2002):
! - added upsamling
! - finally fixed the End-Of-Stream bug: it's now 
!   possible to listen to a playlist with correct
!   update of stream information
! 
! v 0.2c (10th june 2002):
! - fixed some bugs, introduced some new ones...
! 
! v 0.2a (11th mar. 2002):
! - introduced child thread for connect: now pd
!   does no longer 'stop' audio; as a side effect it
!   is now possible to connect to an oggcast~ stream
!   from the same instance of pd
! - threads now use pthreads libraray on Win to have 
!   things compatible with UNIX
! - fixed a small bug that made 'old' audio appear on 
!   the beginning of 'new' one after reconnecting
! 
! v 0.1c (19th feb. 2002):
! - first (sort of) stable release
! 
! 
--- 1,44 ----
! Version history of oggamp~ external for pure-data
! 
! v 0.3 (2nd january 2004):
! - removed the crappy resampling to get rid of audio clicks
! - multichannel support
! 
! v 0.2f (20st july 2002):
! - recompiled with the final 1.0 release of Ogg Vorbis
! 
! v 0.2e (21st june 2002 - stable release):
! - added downsamling
! - cleaned up code a bit
! - added some more info-printout
! - fixed some bugs to make it work correctly on Linux
!   thanks to Oliver Thuns at radiostudio.org
! - now disconnects correctly at end-of-stream (when no
!   chained stream follows)
! - KNOWN BUG: graphic buffer status display might cause ugly
!   printout of Tcl/Tk commands to console window on Linux
!   under some circumstances (e.g. in case server dies)
! 
! v 0.2d (12th june 2002):
! - added upsamling
! - finally fixed the End-Of-Stream bug: it's now 
!   possible to listen to a playlist with correct
!   update of stream information
! 
! v 0.2c (10th june 2002):
! - fixed some bugs, introduced some new ones...
! 
! v 0.2a (11th mar. 2002):
! - introduced child thread for connect: now pd
!   does no longer 'stop' audio; as a side effect it
!   is now possible to connect to an oggcast~ stream
!   from the same instance of pd
! - threads now use pthreads libraray on Win to have 
!   things compatible with UNIX
! - fixed a small bug that made 'old' audio appear on 
!   the beginning of 'new' one after reconnecting
! 
! v 0.1c (19th feb. 2002):
! - first (sort of) stable release
! 
! 

Index: codec.h
===================================================================
RCS file: /cvsroot/pure-data/externals/pdogg/oggamp~/codec.h,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** codec.h	23 Apr 2003 10:36:25 -0000	1.2
--- codec.h	4 Jan 2004 12:16:07 -0000	1.3
***************
*** 1,233 ****
! /********************************************************************
!  *                                                                  *
!  * 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-2001             *
!  * by the XIPHOPHORUS Company http://www.xiph.org/                  *
! 
!  ********************************************************************
! 
!  function: libvorbis codec headers
!  last mod: $Id$
! 
!  ********************************************************************/
! 
! #ifndef _vorbis_codec_h_
! #define _vorbis_codec_h_
! 
! #ifdef __cplusplus
! extern "C"
! {
! #endif /* __cplusplus */
! 
! #include <ogg/ogg.h>
! 
! typedef struct vorbis_info{
!   int version;
!   int channels;
!   long rate;
! 
!   /* The below bitrate declarations are *hints*.
!      Combinations of the three values carry the following implications:
!      
!      all three set to the same value: 
!        implies a fixed rate bitstream
!      only nominal set: 
!        implies a VBR stream that averages the nominal bitrate.  No hard 
!        upper/lower limit
!      upper and or lower set: 
!        implies a VBR bitstream that obeys the bitrate limits. nominal 
!        may also be set to give a nominal rate.
!      none set:
!        the coder does not care to speculate.
!   */
! 
!   long bitrate_upper;
!   long bitrate_nominal;
!   long bitrate_lower;
!   long bitrate_window;
! 
!   void *codec_setup;
! } vorbis_info;
! 
! /* vorbis_dsp_state buffers the current vorbis audio
!    analysis/synthesis state.  The DSP state belongs to a specific
!    logical bitstream ****************************************************/
! typedef struct vorbis_dsp_state{
!   int analysisp;
!   vorbis_info *vi;
! 
!   float **pcm;
!   float **pcmret;
!   int      pcm_storage;
!   int      pcm_current;
!   int      pcm_returned;
! 
!   int  preextrapolate;
!   int  eofflag;
! 
!   long lW;
!   long W;
!   long nW;
!   long centerW;
! 
!   ogg_int64_t granulepos;
!   ogg_int64_t sequence;
! 
!   ogg_int64_t glue_bits;
!   ogg_int64_t time_bits;
!   ogg_int64_t floor_bits;
!   ogg_int64_t res_bits;
! 
!   void       *backend_state;
! } vorbis_dsp_state;
! 
! typedef struct vorbis_block{
!   /* necessary stream state for linking to the framing abstraction */
!   float  **pcm;       /* this is a pointer into local storage */ 
!   oggpack_buffer opb;
!   
!   long  lW;
!   long  W;
!   long  nW;
!   int   pcmend;
!   int   mode;
! 
!   int         eofflag;
!   ogg_int64_t granulepos;
!   ogg_int64_t sequence;
!   vorbis_dsp_state *vd; /* For read-only access of configuration */
! 
!   /* local storage to avoid remallocing; it's up to the mapping to
!      structure it */
!   void               *localstore;
!   long                localtop;
!   long                localalloc;
!   long                totaluse;
!   struct alloc_chain *reap;
! 
!   /* bitmetrics for the frame */
!   long glue_bits;
!   long time_bits;
!   long floor_bits;
!   long res_bits;
! 
!   void *internal;
! 
! } vorbis_block;
! 
! /* vorbis_block is a single block of data to be processed as part of
! the analysis/synthesis stream; it belongs to a specific logical
! bitstream, but is independant from other vorbis_blocks belonging to
! that logical bitstream. *************************************************/
! 
! struct alloc_chain{
!   void *ptr;
!   struct alloc_chain *next;
! };
! 
! /* vorbis_info contains all the setup information specific to the
!    specific compression/decompression mode in progress (eg,
!    psychoacoustic settings, channel setup, options, codebook
!    etc). vorbis_info and substructures are in backends.h.
! *********************************************************************/
! 
! /* the comments are not part of vorbis_info so that vorbis_info can be
!    static storage */
! typedef struct vorbis_comment{
!   /* unlimited user comment fields.  libvorbis writes 'libvorbis'
!      whatever vendor is set to in encode */
!   char **user_comments;
!   int   *comment_lengths;
!   int    comments;
!   char  *vendor;
! 
! } vorbis_comment;
! 
! 
! /* libvorbis encodes in two abstraction layers; first we perform DSP
!    and produce a packet (see docs/analysis.txt).  The packet is then
!    coded into a framed OggSquish bitstream by the second layer (see
!    docs/framing.txt).  Decode is the reverse process; we sync/frame
!    the bitstream and extract individual packets, then decode the
!    packet back into PCM audio.
! 
!    The extra framing/packetizing is used in streaming formats, such as
!    files.  Over the net (such as with UDP), the framing and
!    packetization aren't necessary as they're provided by the transport
!    and the streaming layer is not used */
! 
! /* Vorbis PRIMITIVES: general ***************************************/
! 
! extern void     vorbis_info_init(vorbis_info *vi);
! extern void     vorbis_info_clear(vorbis_info *vi);
! extern int      vorbis_info_blocksize(vorbis_info *vi,int zo);
! extern void     vorbis_comment_init(vorbis_comment *vc);
! extern void     vorbis_comment_add(vorbis_comment *vc, char *comment); 
! extern void     vorbis_comment_add_tag(vorbis_comment *vc, 
! 				       char *tag, char *contents);
! extern char    *vorbis_comment_query(vorbis_comment *vc, char *tag, int count);
! extern int      vorbis_comment_query_count(vorbis_comment *vc, char *tag);
! extern void     vorbis_comment_clear(vorbis_comment *vc);
! 
! extern int      vorbis_block_init(vorbis_dsp_state *v, vorbis_block *vb);
! extern int      vorbis_block_clear(vorbis_block *vb);
! extern void     vorbis_dsp_clear(vorbis_dsp_state *v);
! 
! /* Vorbis PRIMITIVES: analysis/DSP layer ****************************/
! 
! extern int      vorbis_analysis_init(vorbis_dsp_state *v,vorbis_info *vi);
! extern int      vorbis_commentheader_out(vorbis_comment *vc, ogg_packet *op);
! extern int      vorbis_analysis_headerout(vorbis_dsp_state *v,
! 					  vorbis_comment *vc,
! 					  ogg_packet *op,
! 					  ogg_packet *op_comm,
! 					  ogg_packet *op_code);
! extern float  **vorbis_analysis_buffer(vorbis_dsp_state *v,int vals);
! extern int      vorbis_analysis_wrote(vorbis_dsp_state *v,int vals);
! extern int      vorbis_analysis_blockout(vorbis_dsp_state *v,vorbis_block *vb);
! extern int      vorbis_analysis(vorbis_block *vb,ogg_packet *op);
! 
! extern int      vorbis_bitrate_addblock(vorbis_block *vb);
! extern int      vorbis_bitrate_flushpacket(vorbis_dsp_state *vd,
! 					   ogg_packet *op);
! 
! /* Vorbis PRIMITIVES: synthesis layer *******************************/
! extern int      vorbis_synthesis_headerin(vorbis_info *vi,vorbis_comment *vc,
! 					  ogg_packet *op);
! 
! extern int      vorbis_synthesis_init(vorbis_dsp_state *v,vorbis_info *vi);
! extern int      vorbis_synthesis(vorbis_block *vb,ogg_packet *op);
! extern int      vorbis_synthesis_trackonly(vorbis_block *vb,ogg_packet *op);
! extern int      vorbis_synthesis_blockin(vorbis_dsp_state *v,vorbis_block *vb);
! extern int      vorbis_synthesis_pcmout(vorbis_dsp_state *v,float ***pcm);
! extern int      vorbis_synthesis_read(vorbis_dsp_state *v,int samples);
! extern long     vorbis_packet_blocksize(vorbis_info *vi,ogg_packet *op);
! 
! /* Vorbis ERRORS and return codes ***********************************/
! 
! #define OV_FALSE      -1  
! #define OV_EOF        -2
! #define OV_HOLE       -3
! 
! #define OV_EREAD      -128
! #define OV_EFAULT     -129
! #define OV_EIMPL      -130
! #define OV_EINVAL     -131
! #define OV_ENOTVORBIS -132
! #define OV_EBADHEADER -133
! #define OV_EVERSION   -134
! #define OV_ENOTAUDIO  -135
! #define OV_EBADPACKET -136
! #define OV_EBADLINK   -137
! #define OV_ENOSEEK    -138
! 
! #ifdef __cplusplus
! }
! #endif /* __cplusplus */
! 
! #endif
! 
--- 1,233 ----
! /********************************************************************
!  *                                                                  *
!  * 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-2001             *
!  * by the XIPHOPHORUS Company http://www.xiph.org/                  *
! 
!  ********************************************************************
! 
!  function: libvorbis codec headers
!  last mod: $Id$
! 
!  ********************************************************************/
! 
! #ifndef _vorbis_codec_h_
! #define _vorbis_codec_h_
! 
! #ifdef __cplusplus
! extern "C"
! {
! #endif /* __cplusplus */
! 
! #include <ogg/ogg.h>
! 
! typedef struct vorbis_info{
!   int version;
!   int channels;
!   long rate;
! 
!   /* The below bitrate declarations are *hints*.
!      Combinations of the three values carry the following implications:
!      
!      all three set to the same value: 
!        implies a fixed rate bitstream
!      only nominal set: 
!        implies a VBR stream that averages the nominal bitrate.  No hard 
!        upper/lower limit
!      upper and or lower set: 
!        implies a VBR bitstream that obeys the bitrate limits. nominal 
!        may also be set to give a nominal rate.
!      none set:
!        the coder does not care to speculate.
!   */
! 
!   long bitrate_upper;
!   long bitrate_nominal;
!   long bitrate_lower;
!   long bitrate_window;
! 
!   void *codec_setup;
! } vorbis_info;
! 
! /* vorbis_dsp_state buffers the current vorbis audio
!    analysis/synthesis state.  The DSP state belongs to a specific
!    logical bitstream ****************************************************/
! typedef struct vorbis_dsp_state{
!   int analysisp;
!   vorbis_info *vi;
! 
!   float **pcm;
!   float **pcmret;
!   int      pcm_storage;
!   int      pcm_current;
!   int      pcm_returned;
! 
!   int  preextrapolate;
!   int  eofflag;
! 
!   long lW;
!   long W;
!   long nW;
!   long centerW;
! 
!   ogg_int64_t granulepos;
!   ogg_int64_t sequence;
! 
!   ogg_int64_t glue_bits;
!   ogg_int64_t time_bits;
!   ogg_int64_t floor_bits;
!   ogg_int64_t res_bits;
! 
!   void       *backend_state;
! } vorbis_dsp_state;
! 
! typedef struct vorbis_block{
!   /* necessary stream state for linking to the framing abstraction */
!   float  **pcm;       /* this is a pointer into local storage */ 
!   oggpack_buffer opb;
!   
!   long  lW;
!   long  W;
!   long  nW;
!   int   pcmend;
!   int   mode;
! 
!   int         eofflag;
!   ogg_int64_t granulepos;
!   ogg_int64_t sequence;
!   vorbis_dsp_state *vd; /* For read-only access of configuration */
! 
!   /* local storage to avoid remallocing; it's up to the mapping to
!      structure it */
!   void               *localstore;
!   long                localtop;
!   long                localalloc;
!   long                totaluse;
!   struct alloc_chain *reap;
! 
!   /* bitmetrics for the frame */
!   long glue_bits;
!   long time_bits;
!   long floor_bits;
!   long res_bits;
! 
!   void *internal;
! 
! } vorbis_block;
! 
! /* vorbis_block is a single block of data to be processed as part of
! the analysis/synthesis stream; it belongs to a specific logical
! bitstream, but is independant from other vorbis_blocks belonging to
! that logical bitstream. *************************************************/
! 
! struct alloc_chain{
!   void *ptr;
!   struct alloc_chain *next;
! };
! 
! /* vorbis_info contains all the setup information specific to the
!    specific compression/decompression mode in progress (eg,
!    psychoacoustic settings, channel setup, options, codebook
!    etc). vorbis_info and substructures are in backends.h.
! *********************************************************************/
! 
! /* the comments are not part of vorbis_info so that vorbis_info can be
!    static storage */
! typedef struct vorbis_comment{
!   /* unlimited user comment fields.  libvorbis writes 'libvorbis'
!      whatever vendor is set to in encode */
!   char **user_comments;
!   int   *comment_lengths;
!   int    comments;
!   char  *vendor;
! 
! } vorbis_comment;
! 
! 
! /* libvorbis encodes in two abstraction layers; first we perform DSP
!    and produce a packet (see docs/analysis.txt).  The packet is then
!    coded into a framed OggSquish bitstream by the second layer (see
!    docs/framing.txt).  Decode is the reverse process; we sync/frame
!    the bitstream and extract individual packets, then decode the
!    packet back into PCM audio.
! 
!    The extra framing/packetizing is used in streaming formats, such as
!    files.  Over the net (such as with UDP), the framing and
!    packetization aren't necessary as they're provided by the transport
!    and the streaming layer is not used */
! 
! /* Vorbis PRIMITIVES: general ***************************************/
! 
! extern void     vorbis_info_init(vorbis_info *vi);
! extern void     vorbis_info_clear(vorbis_info *vi);
! extern int      vorbis_info_blocksize(vorbis_info *vi,int zo);
! extern void     vorbis_comment_init(vorbis_comment *vc);
! extern void     vorbis_comment_add(vorbis_comment *vc, char *comment); 
! extern void     vorbis_comment_add_tag(vorbis_comment *vc, 
! 				       char *tag, char *contents);
! extern char    *vorbis_comment_query(vorbis_comment *vc, char *tag, int count);
! extern int      vorbis_comment_query_count(vorbis_comment *vc, char *tag);
! extern void     vorbis_comment_clear(vorbis_comment *vc);
! 
! extern int      vorbis_block_init(vorbis_dsp_state *v, vorbis_block *vb);
! extern int      vorbis_block_clear(vorbis_block *vb);
! extern void     vorbis_dsp_clear(vorbis_dsp_state *v);
! 
! /* Vorbis PRIMITIVES: analysis/DSP layer ****************************/
! 
! extern int      vorbis_analysis_init(vorbis_dsp_state *v,vorbis_info *vi);
! extern int      vorbis_commentheader_out(vorbis_comment *vc, ogg_packet *op);
! extern int      vorbis_analysis_headerout(vorbis_dsp_state *v,
! 					  vorbis_comment *vc,
! 					  ogg_packet *op,
! 					  ogg_packet *op_comm,
! 					  ogg_packet *op_code);
! extern float  **vorbis_analysis_buffer(vorbis_dsp_state *v,int vals);
! extern int      vorbis_analysis_wrote(vorbis_dsp_state *v,int vals);
! extern int      vorbis_analysis_blockout(vorbis_dsp_state *v,vorbis_block *vb);
! extern int      vorbis_analysis(vorbis_block *vb,ogg_packet *op);
! 
! extern int      vorbis_bitrate_addblock(vorbis_block *vb);
! extern int      vorbis_bitrate_flushpacket(vorbis_dsp_state *vd,
! 					   ogg_packet *op);
! 
! /* Vorbis PRIMITIVES: synthesis layer *******************************/
! extern int      vorbis_synthesis_headerin(vorbis_info *vi,vorbis_comment *vc,
! 					  ogg_packet *op);
! 
! extern int      vorbis_synthesis_init(vorbis_dsp_state *v,vorbis_info *vi);
! extern int      vorbis_synthesis(vorbis_block *vb,ogg_packet *op);
! extern int      vorbis_synthesis_trackonly(vorbis_block *vb,ogg_packet *op);
! extern int      vorbis_synthesis_blockin(vorbis_dsp_state *v,vorbis_block *vb);
! extern int      vorbis_synthesis_pcmout(vorbis_dsp_state *v,float ***pcm);
! extern int      vorbis_synthesis_read(vorbis_dsp_state *v,int samples);
! extern long     vorbis_packet_blocksize(vorbis_info *vi,ogg_packet *op);
! 
! /* Vorbis ERRORS and return codes ***********************************/
! 
! #define OV_FALSE      -1  
! #define OV_EOF        -2
! #define OV_HOLE       -3
! 
! #define OV_EREAD      -128
! #define OV_EFAULT     -129
! #define OV_EIMPL      -130
! #define OV_EINVAL     -131
! #define OV_ENOTVORBIS -132
! #define OV_EBADHEADER -133
! #define OV_EVERSION   -134
! #define OV_ENOTAUDIO  -135
! #define OV_EBADPACKET -136
! #define OV_EBADLINK   -137
! #define OV_ENOSEEK    -138
! 
! #ifdef __cplusplus
! }
! #endif /* __cplusplus */
! 
! #endif
! 

Index: help-oggamp~.pd
===================================================================
RCS file: /cvsroot/pure-data/externals/pdogg/oggamp~/help-oggamp~.pd,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** help-oggamp~.pd	23 Apr 2003 10:36:25 -0000	1.2
--- help-oggamp~.pd	4 Jan 2004 12:16:07 -0000	1.3
***************
*** 1,54 ****
! #N canvas 176 105 678 455 10;
! #X obj 38 420 dac~;
! #X floatatom 100 419 5 0 0;
! #X text 145 419 connection state;
! #X msg 80 83 connect localhost puredata.ogg 8000;
! #X msg 109 131 disconnect;
! #X msg 35 60 connect ogg.bbc.co.uk radio1_low.ogg 8001;
! #X msg 93 106 connect 141.53.196.149 puredata.ogg 8000;
! #X msg 147 224 recover 0;
! #X msg 163 251 recover 1;
! #X msg 125 153 print;
! #X obj 15 389 *~ 0;
! #X obj 57 391 *~ 0;
! #X floatatom 20 332 5 0 0;
! #X obj 20 354 / 100;
! #X text 57 7 oggamp~ version 0.2 - Ogg Vorbis sreaming client;
! #X msg 139 191 recover -1;
! #X text 218 191 resume (default): mute audio and refill buffer;
! #X text 230 249 reconnect (disconnect and connect again);
! #X text 138 303 CREATION ARGUMENTS:;
! #X text 260 303 oggamp~ <graphic> <outlets> <buffersize>;
! #X text 167 324 <graphic> - turn graphical buffer status display on
! (1) or off (0 \, default);
! #X text 167 351 <outlets> - number of outlets (default = 2) \, mono
! to stereo and stereo to mono conversion supported;
! #X text 333 50 written by Olaf Matthes <olaf.matthes at gmx.de>;
! #X text 333 63 get source at http://www.akustische-kunst.de/;
! #X msg 530 406 \; pd dsp 1;
! #X msg 596 406 \; pd dsp 0;
! #X obj 530 380 loadbang;
! #X msg 16 34 connect radio.jcraft.com test.ogg 8000;
! #X obj 15 300 oggamp~ 1 2 256;
! #X text 154 171 BEHAVIOUR ON BUFFER UNDERRUNS:;
! #X text 166 378 <buffersize> - size of circular buffer in kbytes (default
! = 256k);
! #X text 219 222 disconnect on buffer underrun;
! #X connect 3 0 28 0;
! #X connect 4 0 28 0;
! #X connect 5 0 28 0;
! #X connect 6 0 28 0;
! #X connect 7 0 28 0;
! #X connect 8 0 28 0;
! #X connect 9 0 28 0;
! #X connect 10 0 0 0;
! #X connect 11 0 0 1;
! #X connect 12 0 13 0;
! #X connect 13 0 10 1;
! #X connect 13 0 11 1;
! #X connect 15 0 28 0;
! #X connect 26 0 24 0;
! #X connect 27 0 28 0;
! #X connect 28 0 10 0;
! #X connect 28 1 11 0;
! #X connect 28 2 1 0;
--- 1,54 ----
! #N canvas 176 105 678 455 10;
! #X obj 38 420 dac~;
! #X floatatom 100 419 5 0 0;
! #X text 145 419 connection state;
! #X msg 80 83 connect localhost puredata.ogg 8000;
! #X msg 109 131 disconnect;
! #X msg 35 60 connect ogg.bbc.co.uk radio1_low.ogg 8001;
! #X msg 93 106 connect 141.53.196.149 puredata.ogg 8000;
! #X msg 147 224 recover 0;
! #X msg 163 251 recover 1;
! #X msg 125 153 print;
! #X obj 15 389 *~ 0;
! #X obj 57 391 *~ 0;
! #X floatatom 20 332 5 0 0;
! #X obj 20 354 / 100;
! #X text 57 7 oggamp~ version 0.2 - Ogg Vorbis sreaming client;
! #X msg 139 191 recover -1;
! #X text 218 191 resume (default): mute audio and refill buffer;
! #X text 230 249 reconnect (disconnect and connect again);
! #X text 138 303 CREATION ARGUMENTS:;
! #X text 260 303 oggamp~ <graphic> <outlets> <buffersize>;
! #X text 167 324 <graphic> - turn graphical buffer status display on
! (1) or off (0 \, default);
! #X text 167 351 <outlets> - number of outlets (default = 2) \, mono
! to stereo and stereo to mono conversion supported;
! #X text 333 50 written by Olaf Matthes <olaf.matthes at gmx.de>;
! #X text 333 63 get source at http://www.akustische-kunst.de/;
! #X msg 530 406 \; pd dsp 1;
! #X msg 596 406 \; pd dsp 0;
! #X obj 530 380 loadbang;
! #X msg 16 34 connect radio.jcraft.com test.ogg 8000;
! #X obj 15 300 oggamp~ 1 2 256;
! #X text 154 171 BEHAVIOUR ON BUFFER UNDERRUNS:;
! #X text 166 378 <buffersize> - size of circular buffer in kbytes (default
! = 256k);
! #X text 219 222 disconnect on buffer underrun;
! #X connect 3 0 28 0;
! #X connect 4 0 28 0;
! #X connect 5 0 28 0;
! #X connect 6 0 28 0;
! #X connect 7 0 28 0;
! #X connect 8 0 28 0;
! #X connect 9 0 28 0;
! #X connect 10 0 0 0;
! #X connect 11 0 0 1;
! #X connect 12 0 13 0;
! #X connect 13 0 10 1;
! #X connect 13 0 11 1;
! #X connect 15 0 28 0;
! #X connect 26 0 24 0;
! #X connect 27 0 28 0;
! #X connect 28 0 10 0;
! #X connect 28 1 11 0;
! #X connect 28 2 1 0;

Index: oggamp~.c
===================================================================
RCS file: /cvsroot/pure-data/externals/pdogg/oggamp~/oggamp~.c,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** oggamp~.c	23 Apr 2003 10:36:25 -0000	1.3
--- oggamp~.c	4 Jan 2004 12:16:07 -0000	1.4
***************
*** 1,1491 ****
! /* ------------------------- oggamp~ ------------------------------------------ */
! /*                                                                              */
! /* Tilde object to receive an Ogg Vorbis stream from an IceCast2 server.        */
! /* Written by Olaf Matthes <olaf.matthes at gmx.de>                                */
! /* Get source at http://www.akustische-kunst.de/puredata/                       */
! /*                                                                              */
! /* Graphical buffer status display written by Yves Degoyon.                     */
! /*                                                                              */
! /* Thanks for hours (maybe days?) of beta testing to Oliver Thuns.              */
! /*                                                                              */
[...2890 lines suppressed...]
!     pthread_cond_destroy(&x->x_answercondition);
!     pthread_mutex_destroy(&x->x_mutex);
!     freebytes(x->x_buf, x->x_bufsize*sizeof(t_float));
! 	freebytes(x->x_outvec, x->x_noutlets * sizeof(t_sample *));
! 	clock_free(x->x_clock);
! }
! 
! void oggamp_tilde_setup(void)
! {
!     oggamp_class = class_new(gensym("oggamp~"), (t_newmethod)oggamp_new, 
!     	(t_method)oggamp_free, sizeof(t_oggamp), 0, A_DEFFLOAT, A_DEFFLOAT, A_DEFFLOAT, 0);
!     class_addfloat(oggamp_class, (t_method)oggamp_float);
!     class_addmethod(oggamp_class, (t_method)oggamp_disconnect, gensym("disconnect"), 0);
!     class_addmethod(oggamp_class, (t_method)oggamp_dsp, gensym("dsp"), 0);
!     class_addmethod(oggamp_class, (t_method)oggamp_connect, gensym("connect"), A_GIMME, 0);
!     class_addmethod(oggamp_class, (t_method)oggamp_connect_url, gensym("connecturl"), A_SYMBOL, 0);
!     class_addmethod(oggamp_class, (t_method)oggamp_recover, gensym("recover"), A_FLOAT, 0);
!     class_addmethod(oggamp_class, (t_method)oggamp_print, gensym("print"), 0);
!     class_sethelpsymbol(oggamp_class, gensym("help-oggamp~.pd"));
  }

Index: readme
===================================================================
RCS file: /cvsroot/pure-data/externals/pdogg/oggamp~/readme,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** readme	23 Apr 2003 10:36:25 -0000	1.2
--- readme	4 Jan 2004 12:16:07 -0000	1.3
***************
*** 1,87 ****
! Version 0.2
! copyright (c) 2002 by Olaf Matthes
! 
! oggamp~ is an ogg/vorbis streaming client external for pd (by Miller 
! Puckette) that connects to an IceCast2 server.
! Graphical buffer status display written by Yves Degoyon (ydegoyon at free.fr).
! 
! 
! To run oggamp~ place the file oggamp~.dll for win or oggamp~.pd_linux 
! in the directory of our patch or start pd with '-lib oggamp~' flag. 
! 
! To compile oggamp~ on Linux get the ogg/vorbice library from 
! http://www.vorbis.com/.
! You have to modify the makefile to make it point to the place where the
! ogg/vorbis library is.
! 
! 
! This software is published under LGPL terms.
! 
! This is software with ABSOLUTELY NO WARRANTY.
! Use it at your OWN RISK. It's possible to damage e.g. hardware or your hearing
! due to a bug or for other reasons. 
! 
! *****************************************************************************
! 
! oggamp~ uses the ogg/vorbice library to encode audio data.
! The latest version of ogg/vorbis can be found at http://www.vorbice.com/
! 
! Below is the original copyright information taken from the ogg/vorbis library:
! 
! 
! Copyright (c) 2001, Xiphophorus
! 
! Redistribution and use in source and binary forms, with or without
! modification, are permitted provided that the following conditions
! are met:
! 
! - Redistributions of source code must retain the above copyright
! notice, this list of conditions and the following disclaimer.
! 
! - Redistributions in binary form must reproduce the above copyright
! notice, this list of conditions and the following disclaimer in the
! documentation and/or other materials provided with the distribution.
! 
! - Neither the name of the Xiphophorus nor the names of its contributors
! may be used to endorse or promote products derived from this software
! without specific prior written permission.
! 
! THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
! ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
! LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
! A PARTICULAR PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR
! CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
! EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
! PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
! PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
! LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
! NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
! SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
! 
! *****************************************************************************
! 
! Usage:
! 
! To run oggamp~ innormal mode, just use [oggamp~] or, to get the buffer status
! displayed, use [oggamp~ 1].
! 
! Message "connect <host> <mountpoint> <port>" connects to an IceCast2 server.
! Note that no response about succesfull connection is send by the server. All
! messages in the pd console window about connection status depend on the ability
! to receive data from the server.
! Use "connecturl <url>" to use url-like server adresses (like http://host:post/
! stream.ogg).
! 
! Known bugs and other things:
! - pd halts for a moment when oggamp~ connects to the server. This results in a
!   short audio drop out of sound currently played back.
! - resampling not jet supported
! - playback does not stop on a buffer underrun
! - oggamp~ disconnects at end of stream, i.e. it is not possible to play back
!   files streamed one after another without manual reconnect
! 
! 
! Latest version can be found at:
! http://www.akustische-kunst.de/puredata/
! 
  Please report any bugs to olaf.matthes at gmx.de!
--- 1,87 ----
! Version 0.2
! copyright (c) 2002 by Olaf Matthes
! 
! oggamp~ is an ogg/vorbis streaming client external for pd (by Miller 
! Puckette) that connects to an IceCast2 server.
! Graphical buffer status display written by Yves Degoyon (ydegoyon at free.fr).
! 
! 
! To run oggamp~ place the file oggamp~.dll for win or oggamp~.pd_linux 
! in the directory of our patch or start pd with '-lib oggamp~' flag. 
! 
! To compile oggamp~ on Linux get the ogg/vorbice library from 
! http://www.vorbis.com/.
! You have to modify the makefile to make it point to the place where the
! ogg/vorbis library is.
! 
! 
! This software is published under LGPL terms.
! 
! This is software with ABSOLUTELY NO WARRANTY.
! Use it at your OWN RISK. It's possible to damage e.g. hardware or your hearing
! due to a bug or for other reasons. 
! 
! *****************************************************************************
! 
! oggamp~ uses the ogg/vorbice library to encode audio data.
! The latest version of ogg/vorbis can be found at http://www.vorbice.com/
! 
! Below is the original copyright information taken from the ogg/vorbis library:
! 
! 
! Copyright (c) 2001, Xiphophorus
! 
! Redistribution and use in source and binary forms, with or without
! modification, are permitted provided that the following conditions
! are met:
! 
! - Redistributions of source code must retain the above copyright
! notice, this list of conditions and the following disclaimer.
! 
! - Redistributions in binary form must reproduce the above copyright
! notice, this list of conditions and the following disclaimer in the
! documentation and/or other materials provided with the distribution.
! 
! - Neither the name of the Xiphophorus nor the names of its contributors
! may be used to endorse or promote products derived from this software
! without specific prior written permission.
! 
! THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
! ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
! LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
! A PARTICULAR PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR
! CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
! EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
! PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
! PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
! LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
! NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
! SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
! 
! *****************************************************************************
! 
! Usage:
! 
! To run oggamp~ innormal mode, just use [oggamp~] or, to get the buffer status
! displayed, use [oggamp~ 1].
! 
! Message "connect <host> <mountpoint> <port>" connects to an IceCast2 server.
! Note that no response about succesfull connection is send by the server. All
! messages in the pd console window about connection status depend on the ability
! to receive data from the server.
! Use "connecturl <url>" to use url-like server adresses (like http://host:post/
! stream.ogg).
! 
! Known bugs and other things:
! - pd halts for a moment when oggamp~ connects to the server. This results in a
!   short audio drop out of sound currently played back.
! - resampling not jet supported
! - playback does not stop on a buffer underrun
! - oggamp~ disconnects at end of stream, i.e. it is not possible to play back
!   files streamed one after another without manual reconnect
! 
! 
! Latest version can be found at:
! http://www.akustische-kunst.de/puredata/
! 
  Please report any bugs to olaf.matthes at gmx.de!






More information about the Pd-cvs mailing list