// the main header file for all DSP objects // DSP services: #pragma once #ifndef SAMPLE_TYPEDEF typedef int t_int; typedef float t_sample, t_float; #define SAMPLE_TYPEDEF #endif //#define BIGCHANS #include "z_sys.h" #include "z_proxy.h" #include "z_sigutil.proto.h" // plus_perform etc. #include "z_atom.h" #include "z_util.proto.h" #include "d_signal.h" #include "z_altivec.h" // useful define #ifndef PI #define PI 3.14159265358979323846 #endif // prototypes int sys_getmaxblksize(void); // returns current max blk size int sys_getblksize(void); // returns current blk size float sys_getsr(void); // returns current sampling rate int sys_getch(void); // returns current number of channels int sys_optimize(void); // returns whether to optimize or not int sys_altivec(void); // returns whether machine has vector processing int sys_getdspstate(void); // returns whether audio is on or off void canvas_start_dsp(void); void canvas_stop_dsp(void); void dsp_tick(void); // setup routines used by DSP objects void dsp_add(t_perfroutine f, int n, ...); // called in dsp method void dsp_addv(t_perfroutine f, int n, void **vector); // called in dsp method void z_dsp_setup(t_pxobject *x, long nsignals); // called in new method void z_dsp_free(t_pxobject *x); // default object free void z_add_signalmethod(void); // called in initialization routine void z_box_dsp_setup(t_pxbox *x, long nsignals); // called in new method void z_box_dsp_free(t_pxbox *x); // default object free void z_box_add_signalmethod(void); // called in initialization routine void z_patcher_for_dsp(t_object *x); short z_isconnected(t_object *x, t_object *dst, short *index); short z_dsp_setloadupdate(short way); void *dsp_setpostprocess(method pm); #define dsp_setup z_dsp_setup #define dsp_free z_dsp_free #define dsp_initclass z_add_signalmethod #define dsp_setupbox z_box_dsp_setup #define dsp_freebox z_box_dsp_free #define dsp_initboxclass z_box_add_signalmethod #define dsp_patcher z_patcher_for_dsp #define dsp_isconnected z_isconnected #define dsp_setloadupdate z_dsp_setloadupdate #define dsp_fts_mode (gensym("__Mode_FTS")->s_thing) short aiff_parse(char *header, long *offset, long *size, long *nchans, long *ssize, long *srate, void *chunk, void *markers);