Update of /cvsroot/pure-data/externals/iemlib/src/iem_mp3 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv29541/iem_mp3
Modified Files: iem_mp3.c iemlib.h sigmp3play.c Log Message: updated to release-1.16
Index: iem_mp3.c =================================================================== RCS file: /cvsroot/pure-data/externals/iemlib/src/iem_mp3/iem_mp3.c,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** iem_mp3.c 18 May 2004 21:33:25 -0000 1.1.1.1 --- iem_mp3.c 2 Jun 2005 18:24:59 -0000 1.2 *************** *** 1,35 **** ! /* For information on usage and redistribution, and for a DISCLAIMER OF ALL ! * WARRANTIES, see the file, "LICENSE.txt," in this distribution. ! ! iem_mp3 written by Thomas Musil, Copyright (c) IEM KUG Graz Austria 2000 - 2003 */ ! ! #ifdef NT ! #pragma warning( disable : 4244 ) ! #pragma warning( disable : 4305 ) ! #endif ! ! #include "m_pd.h" ! #include "iemlib.h" ! ! static t_class *iem_mp3_class; ! ! static void *iem_mp3_new(void) ! { ! t_object *x = (t_object *)pd_new(iem_mp3_class); ! ! return (x); ! } ! ! void sigmp3play_setup(void); ! ! /* ------------------------ setup routine ------------------------- */ ! ! void iem_mp3_setup(void) ! { ! iem_mp3_class = class_new(gensym("iem_mp3"), iem_mp3_new, 0, ! sizeof(t_object), CLASS_NOINLET, 0); ! ! sigmp3play_setup(); ! ! post("iem_mp3 (R-1.15) library loaded!"); ! } --- 1,36 ---- ! /* For information on usage and redistribution, and for a DISCLAIMER OF ALL ! * WARRANTIES, see the file, "LICENSE.txt," in this distribution. ! ! iem_mp3 written by Thomas Musil, Copyright (c) IEM KUG Graz Austria 2000 - 2005 */ ! ! #ifdef NT ! #pragma warning( disable : 4244 ) ! #pragma warning( disable : 4305 ) ! #endif ! ! #include "m_pd.h" ! #include "iemlib.h" ! ! static t_class *iem_mp3_class; ! ! static void *iem_mp3_new(void) ! { ! t_object *x = (t_object *)pd_new(iem_mp3_class); ! ! return (x); ! } ! ! void sigmp3play_setup(void); ! ! /* ------------------------ setup routine ------------------------- */ ! ! void iem_mp3_setup(void) ! { ! iem_mp3_class = class_new(gensym("iem_mp3"), iem_mp3_new, 0, ! sizeof(t_object), CLASS_NOINLET, 0); ! ! sigmp3play_setup(); ! ! post("iem_mp3 (R-1.16) library loaded! (c) Thomas Musil 05.2005"); ! post(" musil%ciem.at iem KUG Graz Austria", '@'); ! }
Index: sigmp3play.c =================================================================== RCS file: /cvsroot/pure-data/externals/iemlib/src/iem_mp3/sigmp3play.c,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** sigmp3play.c 18 May 2004 21:33:27 -0000 1.1.1.1 --- sigmp3play.c 2 Jun 2005 18:24:59 -0000 1.2 *************** *** 1,3865 **** ! /* For information on usage and redistribution, and for a DISCLAIMER OF ALL ! * WARRANTIES, see the file, "LICENSE.txt," in this distribution. ! ! iem_mp3 written by Thomas Musil, Copyright (c) IEM KUG Graz Austria 2000 - 2003 */ ! ! /* ! sigmp3play.c - Mpeg Layer III Player for PD ! Version:0.1 ! 05-18-2000 ! written by Thomas Musil (musil@iem.kug.ac.at), Norbert Math (math@iem.kug.ac.at) [...7700 lines suppressed...] ! } ! ! void sigmp3play_setup(void) ! { ! sigmp3play_class = class_new(gensym("mp3play~"), (t_newmethod)sigmp3play_new, ! (t_method)sigmp3play_free, sizeof(t_sigmp3play), 0, 0); ! class_addmethod(sigmp3play_class, (t_method)sigmp3play_dsp, gensym("dsp"), 0); ! class_addmethod(sigmp3play_class, (t_method)sigmp3play_start, gensym("start"), 0); ! class_addmethod(sigmp3play_class, (t_method)sigmp3play_ft1, ! gensym("ft1"), A_FLOAT, 0); ! class_addmethod(sigmp3play_class, (t_method)sigmp3play_stop, gensym("stop"), 0); ! class_addmethod(sigmp3play_class, (t_method)sigmp3play_pause, gensym("pause"), 0); ! class_addmethod(sigmp3play_class, (t_method)sigmp3play_open_again_at, gensym("open_again_at"), 0); ! class_addmethod(sigmp3play_class, (t_method)sigmp3play_open, gensym("open"), A_DEFSYM, 0); ! class_addmethod(sigmp3play_class, (t_method)sigmp3play_open_again, gensym("open_again"), 0); ! class_addmethod(sigmp3play_class, (t_method)sigmp3play_open_at, gensym("open_at"), A_DEFSYM, 0); ! class_sethelpsymbol(sigmp3play_class, gensym("iemhelp/help-mp3play~")); ! /*post("\nmp3play~ written by thomas musil & norbert math\nV 0.1 iem graz ! austria 05 2000\n");*/ ! }
Index: iemlib.h =================================================================== RCS file: /cvsroot/pure-data/externals/iemlib/src/iem_mp3/iemlib.h,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** iemlib.h 18 May 2004 21:33:25 -0000 1.1.1.1 --- iemlib.h 2 Jun 2005 18:24:59 -0000 1.2 *************** *** 1,98 **** ! /* For information on usage and redistribution, and for a DISCLAIMER OF ALL ! * WARRANTIES, see the file, "LICENSE.txt," in this distribution. ! ! iemlib1 written by Thomas Musil, Copyright (c) IEM KUG Graz Austria 2000 - 2003 */ ! ! #ifndef __IEMLIB_H__ ! #define __IEMLIB_H__ ! ! ! #define IS_A_POINTER(atom,index) ((atom+index)->a_type == A_POINTER) ! #define IS_A_FLOAT(atom,index) ((atom+index)->a_type == A_FLOAT) ! #define IS_A_SYMBOL(atom,index) ((atom+index)->a_type == A_SYMBOL) ! #define IS_A_DOLLAR(atom,index) ((atom+index)->a_type == A_DOLLAR) ! #define IS_A_DOLLSYM(atom,index) ((atom+index)->a_type == A_DOLLSYM) ! #define IS_A_SEMI(atom,index) ((atom+index)->a_type == A_SEMI) ! #define IS_A_COMMA(atom,index) ((atom+index)->a_type == A_COMMA) ! ! ! #ifdef NT ! int sys_noloadbang; ! //t_symbol *iemgui_key_sym=0; ! #include <io.h> ! #else ! extern int sys_noloadbang; ! //extern t_symbol *iemgui_key_sym; ! #include <unistd.h> ! #endif ! ! #define DEFDELVS 64 ! #define XTRASAMPS 4 ! #define SAMPBLK 4 ! ! ! #define UNITBIT32 1572864. /* 3*2^19; bit 32 has place value 1 */ ! ! /* machine-dependent definitions. These ifdefs really ! should have been by CPU type and not by operating system! */ ! #ifdef IRIX ! /* big-endian. Most significant byte is at low address in memory */ ! #define HIOFFSET 0 /* word offset to find MSB */ ! #define LOWOFFSET 1 /* word offset to find LSB */ ! #define int32 long /* a data type that has 32 bits */ ! #else ! #ifdef MSW ! /* little-endian; most significant byte is at highest address */ ! #define HIOFFSET 1 ! #define LOWOFFSET 0 ! #define int32 long ! #else ! #ifdef __FreeBSD__ ! #include <machine/endian.h> ! #if BYTE_ORDER == LITTLE_ENDIAN ! #define HIOFFSET 1 ! #define LOWOFFSET 0 ! #else ! #define HIOFFSET 0 /* word offset to find MSB */ ! #define LOWOFFSET 1 /* word offset to find LSB */ ! #endif /* BYTE_ORDER */ ! #include <sys/types.h> ! #define int32 int32_t ! #endif ! #ifdef __linux__ ! ! #include <endian.h> ! ! #if !defined(__BYTE_ORDER) || !defined(__LITTLE_ENDIAN) ! #error No byte order defined ! #endif ! ! #if __BYTE_ORDER == __LITTLE_ENDIAN ! #define HIOFFSET 1 ! #define LOWOFFSET 0 ! #else ! #define HIOFFSET 0 /* word offset to find MSB */ ! #define LOWOFFSET 1 /* word offset to find LSB */ ! #endif /* __BYTE_ORDER */ ! ! #include <sys/types.h> ! #define int32 int32_t ! ! #else ! #ifdef MACOSX ! #define HIOFFSET 0 /* word offset to find MSB */ ! #define LOWOFFSET 1 /* word offset to find LSB */ ! #define int32 int /* a data type that has 32 bits */ ! ! #endif /* MACOSX */ ! #endif /* __linux__ */ ! #endif /* MSW */ ! #endif /* SGI */ ! ! union tabfudge ! { ! double tf_d; ! int32 tf_i[2]; ! }; ! ! #endif --- 1,102 ---- ! /* For information on usage and redistribution, and for a DISCLAIMER OF ALL ! * WARRANTIES, see the file, "LICENSE.txt," in this distribution. ! ! iemlib written by Thomas Musil, Copyright (c) IEM KUG Graz Austria 2000 - 2005 */ ! ! #ifndef __IEMLIB_H__ ! #define __IEMLIB_H__ ! ! ! #define IS_A_POINTER(atom,index) ((atom+index)->a_type == A_POINTER) ! #define IS_A_FLOAT(atom,index) ((atom+index)->a_type == A_FLOAT) ! #define IS_A_SYMBOL(atom,index) ((atom+index)->a_type == A_SYMBOL) ! #define IS_A_DOLLAR(atom,index) ((atom+index)->a_type == A_DOLLAR) ! #define IS_A_DOLLSYM(atom,index) ((atom+index)->a_type == A_DOLLSYM) ! #define IS_A_SEMI(atom,index) ((atom+index)->a_type == A_SEMI) ! #define IS_A_COMMA(atom,index) ((atom+index)->a_type == A_COMMA) ! ! ! #ifdef NT ! int sys_noloadbang; ! //t_symbol *iemgui_key_sym=0; ! #include <io.h> ! #else ! extern int sys_noloadbang; ! //extern t_symbol *iemgui_key_sym; ! #include <unistd.h> ! #endif ! ! #define DEFDELVS 64 ! #define XTRASAMPS 4 ! #define SAMPBLK 4 ! ! ! #define UNITBIT32 1572864. /* 3*2^19; bit 32 has place value 1 */ ! ! /* machine-dependent definitions. These ifdefs really ! should have been by CPU type and not by operating system! */ ! #ifdef IRIX ! /* big-endian. Most significant byte is at low address in memory */ ! #define HIOFFSET 0 /* word offset to find MSB */ ! #define LOWOFFSET 1 /* word offset to find LSB */ ! #define int32 long /* a data type that has 32 bits */ ! #else ! #ifdef MSW ! /* little-endian; most significant byte is at highest address */ ! #define HIOFFSET 1 ! #define LOWOFFSET 0 ! #define int32 long ! #else ! #ifdef __FreeBSD__ ! #include <machine/endian.h> ! #if BYTE_ORDER == LITTLE_ENDIAN ! #define HIOFFSET 1 ! #define LOWOFFSET 0 ! #else ! #define HIOFFSET 0 /* word offset to find MSB */ ! #define LOWOFFSET 1 /* word offset to find LSB */ ! #endif /* BYTE_ORDER */ ! #include <sys/types.h> ! #define int32 int32_t ! #endif ! #ifdef __linux__ ! ! #include <endian.h> ! ! #if !defined(__BYTE_ORDER) || !defined(__LITTLE_ENDIAN) ! #error No byte order defined ! #endif ! ! #if __BYTE_ORDER == __LITTLE_ENDIAN ! #define HIOFFSET 1 ! #define LOWOFFSET 0 ! #else ! #define HIOFFSET 0 /* word offset to find MSB */ ! #define LOWOFFSET 1 /* word offset to find LSB */ ! #endif /* __BYTE_ORDER */ ! ! #include <sys/types.h> ! #define int32 int32_t ! ! #else ! #ifdef __APPLE__ ! #define HIOFFSET 0 /* word offset to find MSB */ ! #define LOWOFFSET 1 /* word offset to find LSB */ ! #define int32 int /* a data type that has 32 bits */ ! ! #endif /* __APPLE__ */ ! #endif /* __linux__ */ ! #endif /* MSW */ ! #endif /* SGI */ ! ! union tabfudge ! { ! double tf_d; ! int32 tf_i[2]; ! }; ! ! #define IEM_DENORMAL(f) ((((*(unsigned int*)&(f))&0x60000000)==0) || \ ! (((*(unsigned int*)&(f))&0x60000000)==0x60000000)) ! /* more stringent test: anything not between 1e-19 and 1e19 in absolute val */ ! ! #endif