Commit 832c97f1 authored by Ivica Bukvic's avatar Ivica Bukvic
Browse files

*removed unnecessary files

parent 222e51d8
#include "../../creb/include/extlib_util.h"
float milliseconds_2_one_minus_realpole(float time)
{
float r;
if (time < 0.0f) time = 0.0f;
r = -expm1(1000.0f * log(ENVELOPE_RANGE) / (sys_getsr() * time));
if (!(r < 1.0f)) r = 1.0f;
return r;
}
/* Copyright (c) 1997-1999 Miller Puckette.
* For information on usage and redistribution, and for a DISCLAIMER OF ALL
* WARRANTIES, see the file, "LICENSE.txt," in this distribution. */
/* g_7_guis.h written by Thomas Musil (c) IEM KUG Graz Austria 2000-2001 */
#define IEM_GUI_DEFAULTSIZE 15
#define IEM_GUI_MINSIZE 8
#define IEM_SL_DEFAULTSIZE 128
#define IEM_SL_MINSIZE 2
#define IEM_FONT_MINSIZE 4
#define IEM_GUI_DRAW_MODE_UPDATE 0
#define IEM_GUI_DRAW_MODE_MOVE 1
#define IEM_GUI_DRAW_MODE_NEW 2
#define IEM_GUI_DRAW_MODE_SELECT 3
#define IEM_GUI_DRAW_MODE_CONFIG 5
#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 IEM_GUI_OLD_SND_FLAG 1
#define IEM_GUI_OLD_RCV_FLAG 2
#define IEMGUI_MAX_NUM_LEN 32
#define SCALE_NUM_MINWIDTH 1
#define SCALE_NUM_MINHEIGHT 8
#define SCALE_GOP_MINWIDTH 12
#define SCALE_GOP_MINHEIGHT 12
#define SCALEHANDLE_WIDTH 5
#define SCALEHANDLE_HEIGHT 5
#define LABELHANDLE_WIDTH 5
#define LABELHANDLE_HEIGHT 5
typedef void (*t_iemfunptr)(void *x, t_glist *glist, int mode);
struct _scalehandle;
typedef void (*t_clickhandlefn)(struct _scalehandle *sh, int newstate);
typedef void (*t_motionhandlefn)(struct _scalehandle *sh, t_floatarg f1, t_floatarg f2);
EXTERN t_class *scalehandle_class;
typedef struct _scalehandle
{
t_pd h_pd;
t_object *h_master;
t_glist *h_glist; // this is the canvas to draw on. Note that when objects are edited, "glist" and "canvas" mean the same.
t_symbol *h_bindsym;
int h_scale; // bool
char h_pathname[37]; // max size for ".x%lx.h%lx" = 5+4*sizeof(long)
char h_outlinetag[18]; // max size for "h%lx" = 2+2*sizeof(long)
int h_dragon; // bool
int h_dragx;
int h_dragy;
int h_offset_x;
int h_offset_y;
int h_vis; // bool
t_clickhandlefn h_clickfn;
t_motionhandlefn h_motionfn;
} t_scalehandle;
typedef struct _iemgui
{
t_object x_obj;
t_glist *x_glist;
t_iemfunptr x_draw; //29 /* this should be static */
int x_h; //unsigned //80
int x_w; //unsigned //119
int x_ldx; //33
int x_ldy; //33
int x_fontsize;//uns. //41
int x_fcol;//iemcolor //35 /* foreground */
int x_bcol;//iemcolor //41 /* background */
int x_lcol;//iemcolor //21 /* label */
t_symbol *x_snd; //18 /* send symbol */
t_symbol *x_rcv; //33 /* receive */
t_symbol *x_lab; //15 /* label */
t_symbol *x_snd_unexpanded; //7 /* same 3, with '$' unexpanded */
t_symbol *x_rcv_unexpanded; //7
t_symbol *x_lab_unexpanded; //6
int x_binbufindex; //4 /* where in binbuf to find these (this should be static) */
int x_labelbindex; //5 /* where in binbuf to find label (this should be static) */
t_scalehandle *x_handle; //24
t_scalehandle *x_lhandle; //19
int x_vis; //bool //64 /* is the object drawn? */
int x_changed; //bool //30 /* has the value changed so that we need to do graphic update */
// grep -w "$1" *.[ch]|wc -l
t_glist *x_selected; // 24 matches
// from t_iem_fstyle_flags
unsigned int x_font_style:6; // 33 matches
unsigned int x_finemoved:1; // 7 matches (sliders and [nbx] only)
unsigned int x_put_in2out:1; // 9 matches
unsigned int x_change:1; // 28 matches // what's this and why is there also a x_changed ?
// from t_iem_init_symargs
unsigned int x_loadinit:1; // 21 matches
unsigned int x_locked:1; // 7 matches ([bng] only)
unsigned int x_reverse:1; // 4 matches (sliders only)
unsigned int dummy:20;
} t_iemgui;
typedef struct _bng
{
t_iemgui x_gui;
int x_flashed; // bool
int x_flashtime_break; // >= 0
int x_flashtime_hold; // >= 0
t_clock *x_clock_hld;
t_clock *x_clock_brk;
t_clock *x_clock_lck;
} t_bng;
typedef struct _slider
{
t_iemgui x_gui;
int x_pos;
int x_val;
int x_center; // is this necessary ?
int x_thick; // bool
int x_lin0_log1; // bool
int x_steady; // bool
double x_min;
double x_max;
double x_k;
double x_last;
int x_is_last_float; // bool
int x_orient; // bool: 0=horizontal ([hsl]), 1=vertical ([vsl])
} t_slider;
typedef struct _radio
{
t_iemgui x_gui;
int x_on; // unsigned < x_number
int x_on_old; /* for use by [hdl] [vdl] */
int x_change; // bool
int x_number; // unsigned > 0
int x_drawn; // unsigned < x_number
t_atom x_at[2]; // tmp buffer for outlet_list
int x_orient; // bool: 0=horiz, 1=vert
} t_radio;
typedef struct _toggle
{
t_iemgui x_gui;
t_float x_on;
t_float x_nonzero;
} t_toggle;
typedef struct _my_canvas
{
t_iemgui x_gui;
t_atom x_at[2]; // tmp buffer for outlet_list
int x_vis_w; // unsigned
int x_vis_h; // unsigned
} t_my_canvas;
typedef struct _vu
{
t_iemgui x_gui;
int x_led_size; // unsigned
int x_peak; // 1..40 if visible ; 0 if invisible
int x_rms; // 1..40 if visible ; 0 if invisible
t_float x_fp; // value for outlet 1
t_float x_fr; // value for outlet 0
int x_scale; // bool
t_outlet *x_out_rms; // outlet 0
t_outlet *x_out_peak; // outlet 1
unsigned int x_updaterms:1;
unsigned int x_updatepeak:1;
} t_vu;
typedef struct _my_numbox
{
t_iemgui x_gui;
t_clock *x_clock_reset;
t_clock *x_clock_wait;
double x_val;
double x_min;
double x_max;
double x_k;
int x_lin0_log1; // bool
char x_buf[IEMGUI_MAX_NUM_LEN];
int x_numwidth; // unsigned
int x_scalewidth; /* temporary value for scalehandle */
int x_scaleheight; /* temporary value for scalehandle */
int x_tmpfontsize; /* temporary value for scalehandle */
int x_log_height;
int x_hide_frame; /* 0 default, 1 just arrow, 2, just frame, 3 both */
} t_my_numbox;
extern int sys_noloadbang;
extern int iemgui_color_hex[];
EXTERN int iemgui_clip_size(int size);
EXTERN int iemgui_clip_font(int size);
EXTERN void iemgui_verify_snd_ne_rcv(t_iemgui *iemgui);
EXTERN t_symbol *iemgui_getfloatsym(t_atom *a);
EXTERN t_symbol *iemgui_getfloatsymarg(int i, int argc, t_atom *argv);
EXTERN void iemgui_new_getnames(t_iemgui *iemgui, int indx, t_atom *argv);
EXTERN void iemgui_all_colfromload(t_iemgui *iemgui, int *bflcol);
EXTERN void iemgui_send(t_iemgui *x, t_symbol *s);
EXTERN void iemgui_receive(t_iemgui *x, t_symbol *s);
EXTERN void iemgui_label(t_iemgui *x, t_symbol *s);
EXTERN void iemgui_label_pos(t_iemgui *x, t_symbol *s, int ac, t_atom *av);
EXTERN void iemgui_label_font(t_iemgui *x, t_symbol *s, int ac, t_atom *av);
EXTERN void iemgui_label_getrect(t_iemgui x_gui, t_glist *x, int *xp1, int *yp1, int *xp2, int *yp2);
EXTERN void iemgui_shouldvis(t_iemgui *x, int mode);
EXTERN void iemgui_size(t_iemgui *x);
EXTERN void iemgui_delta(t_iemgui *x, t_symbol *s, int ac, t_atom *av);
EXTERN void iemgui_pos(t_iemgui *x, t_symbol *s, int ac, t_atom *av);
EXTERN void iemgui_color(t_iemgui *x, t_symbol *s, int ac, t_atom *av);
EXTERN void iemgui_displace(t_gobj *z, t_glist *glist, int dx, int dy);
EXTERN void iemgui_displace_withtag(t_gobj *z, t_glist *glist, int dx, int dy);
EXTERN void iemgui_select(t_gobj *z, t_glist *glist, int selected);
EXTERN void iemgui_delete(t_gobj *z, t_glist *glist);
EXTERN void iemgui_vis(t_gobj *z, t_glist *glist, int vis);
EXTERN void iemgui_save(t_iemgui *x, t_symbol **srl, int *bflcol);
EXTERN void iemgui_properties(t_iemgui *x, t_symbol **srl);
EXTERN int iemgui_dialog(t_iemgui *x, int argc, t_atom *argv);
EXTERN void iem_inttosymargs(t_iemgui *x, int n);
EXTERN int iem_symargstoint(t_iemgui *x);
EXTERN void iem_inttofstyle(t_iemgui *x, int n);
EXTERN int iem_fstyletoint(t_iemgui *x);
EXTERN void canvas_apply_setundo(t_canvas *x, t_gobj *y);
// scalehandle code, as refactored by Mathieu
EXTERN void scalehandle_bind(t_scalehandle *h);
EXTERN void scalehandle_draw_select(t_scalehandle *h, int px, int py);
EXTERN void scalehandle_draw_select2(t_iemgui *x);
EXTERN void scalehandle_draw_erase(t_scalehandle *h);
EXTERN void scalehandle_draw_erase2(t_iemgui *x);
EXTERN void scalehandle_draw(t_iemgui *x);
EXTERN t_scalehandle *scalehandle_new(t_object *x, t_glist *glist, int scale, t_clickhandlefn chf, t_motionhandlefn mhf);
EXTERN void scalehandle_free(t_scalehandle *h);
EXTERN void properties_set_field_int(long props, const char *gui_field, int value);
EXTERN void scalehandle_dragon_label(t_scalehandle *h, float f1, float f2);
EXTERN void scalehandle_unclick_label(t_scalehandle *h);
EXTERN void scalehandle_click_label(t_scalehandle *h);
EXTERN void scalehandle_click_scale(t_scalehandle *h);
EXTERN void scalehandle_unclick_scale(t_scalehandle *h);
EXTERN void scalehandle_drag_scale(t_scalehandle *h);
EXTERN void iemgui__clickhook3(t_scalehandle *sh, int newstate);
EXTERN int mini(int a, int b);
EXTERN int maxi(int a, int b);
EXTERN float minf(float a, float b);
EXTERN float maxf(float a, float b);
// other refactor by Mathieu
EXTERN void iemgui_tag_selected( t_iemgui *x);
EXTERN void iemgui_label_draw_new( t_iemgui *x);
EXTERN void iemgui_label_draw_move( t_iemgui *x);
EXTERN void iemgui_label_draw_config(t_iemgui *x);
EXTERN void iemgui_label_draw_select(t_iemgui *x);
EXTERN void iemgui_io_draw_move(t_iemgui *x);
EXTERN void iemgui_draw_io(t_iemgui *x, int old_sr_flags);
EXTERN void iemgui_base_draw_new(t_iemgui *x);
EXTERN void iemgui_base_draw_move(t_iemgui *x);
EXTERN void iemgui_base_draw_config(t_iemgui *x);
EXTERN void iemgui_draw_new(t_iemgui *x);
EXTERN void iemgui_draw_config(t_iemgui *x);
EXTERN void iemgui_draw_move(t_iemgui *x);
EXTERN void iemgui_draw_erase(t_iemgui *x);
EXTERN void wb_init(t_widgetbehavior *wb, t_getrectfn gr, t_clickfn cl); // rename this to iemgui_wb_init
extern t_symbol *s_empty;
EXTERN const char *selection_color;
static inline int iemgui_has_snd (t_iemgui *x) {return x->x_snd!=s_empty;}
static inline int iemgui_has_rcv (t_iemgui *x) {return x->x_rcv!=s_empty;}
EXTERN const char *iemgui_font(t_iemgui *x);
EXTERN const char *iemgui_typeface(t_iemgui *x);
EXTERN void iemgui_class_addmethods(t_class *c);
EXTERN void scrollbar_update(t_glist *glist);
EXTERN void iemgui_init(t_iemgui *x, t_floatarg f);
EXTERN void iemgui_out_bang(t_iemgui *x, int o, int chk_putin);
EXTERN void iemgui_out_float(t_iemgui *x, int o, int chk_putin, t_float f);
EXTERN void iemgui_out_list(t_iemgui *x, int o, int chk_putin, t_symbol *s, int argc, t_atom *argv);
This diff is collapsed.
/* Copyright (c) 1997-1999 Miller Puckette.
* For information on usage and redistribution, and for a DISCLAIMER OF ALL
* WARRANTIES, see the file, "LICENSE.txt," in this distribution. */
/* This file contains function prototypes and data types used to implement
Pd, but not shared with Pd objects. */
/* NOTE: this file describes Pd implementation details which may change
in future releases. The public (stable) API is in m_pd.h. */
/* LATER consider whether to use 'char' for method arg types to save space */
#ifndef __m_imp_h_
/* the structure for a method handler ala Max */
typedef struct _methodentry
{
t_symbol *me_name;
t_gotfn me_fun;
t_atomtype me_arg[MAXPDARG+1];
} t_methodentry;
EXTERN_STRUCT _widgetbehavior;
typedef void (*t_bangmethod)(t_pd *x);
typedef void (*t_pointermethod)(t_pd *x, t_gpointer *gp);
typedef void (*t_floatmethod)(t_pd *x, t_float f);
typedef void (*t_symbolmethod)(t_pd *x, t_symbol *s);
typedef void (*t_blobmethod)(t_pd *x, t_blob *st); /* MP20061226 blob type */
typedef void (*t_listmethod)(t_pd *x, t_symbol *s, int argc, t_atom *argv);
typedef void (*t_anymethod)(t_pd *x, t_symbol *s, int argc, t_atom *argv);
struct _class
{
t_symbol *c_name; /* name (mostly for error reporting) */
t_symbol *c_helpname; /* name of help file */
t_symbol *c_externdir; /* directory extern was loaded from */
size_t c_size; /* size of an instance */
t_methodentry *c_methods; /* methods other than bang, etc below */
int c_nmethod; /* number of methods */
t_method c_freemethod; /* function to call before freeing */
t_bangmethod c_bangmethod; /* common methods */
t_pointermethod c_pointermethod;
t_floatmethod c_floatmethod;
t_symbolmethod c_symbolmethod;
t_blobmethod c_blobmethod; /* MP20061226 blob type */
t_listmethod c_listmethod;
t_anymethod c_anymethod;
struct _widgetbehavior *c_wb; /* "gobjs" only */
struct _parentwidgetbehavior *c_pwb;/* widget behavior in parent */
t_savefn c_savefn; /* function to call when saving */
t_propertiesfn c_propertiesfn; /* function to start prop dialog */
int c_floatsignalin; /* onset to float for signal input */
char c_gobj; /* true if is a gobj */
char c_patchable; /* true if we have a t_object header */
char c_firstin; /* if patchable, true if draw first inlet */
char c_drawcommand; /* a drawing command for a template */
};
/* m_obj.c */
EXTERN int obj_noutlets(t_object *x);
EXTERN int obj_ninlets(t_object *x);
EXTERN t_outconnect *obj_starttraverseoutlet(t_object *x, t_outlet **op,
int nout);
EXTERN t_outconnect *obj_nexttraverseoutlet(t_outconnect *lastconnect,
t_object **destp, t_inlet **inletp, int *whichp);
EXTERN t_outconnect *obj_connect(t_object *source, int outno,
t_object *sink, int inno);
EXTERN void obj_disconnect(t_object *source, int outno, t_object *sink,
int inno);
EXTERN void outlet_setstacklim(void);
EXTERN int obj_issignalinlet(t_object *x, int m);
EXTERN int obj_issignaloutlet(t_object *x, int m);
EXTERN int obj_nsiginlets(t_object *x);
EXTERN int obj_nsigoutlets(t_object *x);
EXTERN int obj_siginletindex(t_object *x, int m);
EXTERN int obj_sigoutletindex(t_object *x, int m);
/* misc */
EXTERN void glob_evalfile(t_pd *ignore, t_symbol *name, t_symbol *dir);
EXTERN void glob_initfromgui(void *dummy, t_symbol *s, int argc, t_atom *argv);
EXTERN void glob_quit(void *dummy);
#define __m_imp_h_
#endif /* __m_imp_h_ */
This diff is collapsed.
/* Copyright (c) 1997-1999 Miller Puckette.
* For information on usage and redistribution, and for a DISCLAIMER OF ALL
* WARRANTIES, see the file, "LICENSE.txt," in this distribution. */
/* Audio and MIDI I/O, and other scheduling and system stuff. */
/* NOTE: this file describes Pd implementation details which may change
in future releases. The public (stable) API is in m_pd.h. */
#ifndef __s_stuff_h_
#define __s_stuff_h_
/* in s_path.c */
typedef struct _namelist /* element in a linked list of stored strings */
{
struct _namelist *nl_next; /* next in list */
char *nl_string; /* the string */
} t_namelist;
t_namelist *pd_extrapath;
t_namelist *namelist_append(t_namelist *listwas, const char *s, int allowdup);
t_namelist *namelist_append_files(t_namelist *listwas, const char *s);
void namelist_free(t_namelist *listwas);
char *namelist_get(t_namelist *namelist, int n);
void sys_setextrapath(const char *p);
extern int sys_usestdpath;
extern t_namelist *sys_externlist;
extern t_namelist *sys_searchpath;
extern t_namelist *sys_helppath;
int sys_open_absolute(const char *name, const char* ext,
char *dirresult, char **nameresult, unsigned int size, int bin, int *fdp);
int sys_trytoopenone(const char *dir, const char *name, const char* ext,
char *dirresult, char **nameresult, unsigned int size, int bin);
t_symbol *sys_decodedialog(t_symbol *s);
/* s_file.c */
void sys_loadpreferences( void);
void sys_savepreferences( void);
extern int sys_defeatrt;
extern t_symbol *sys_flags;
/* s_main.c */
extern int sys_debuglevel;
extern int sys_verbose;
extern int sys_noloadbang;
extern int sys_nogui;
extern char *sys_guicmd;
#ifdef QTGUI
extern int sys_qtcanvas;
#endif
EXTERN int sys_nearestfontsize(int fontsize);
EXTERN int sys_hostfontsize(int fontsize);
extern int sys_defaultfont;
extern t_symbol *sys_libdir; /* library directory for auxilliary files */
extern t_symbol *sys_guidir; /* directory holding pd_gui, u_pdsend, etc */
/* s_loader.c */
typedef int (*loader_t)(t_canvas *canvas, char *classname); /* callback type */
EXTERN int sys_load_lib(t_canvas *canvas, char *filename);
EXTERN void sys_register_loader(loader_t loader);
/* s_audio.c */
#define SENDDACS_NO 0 /* return values for sys_send_dacs() */
#define SENDDACS_YES 1
#define SENDDACS_SLEPT 2
#define DEFDACBLKSIZE 64
extern int sys_schedblocksize; /* audio block size for scheduler */
extern int sys_hipriority; /* real-time flag, true if priority boosted */
extern t_sample *sys_soundout;
extern t_sample *sys_soundin;
extern int sys_inchannels;
extern int sys_outchannels;
extern int sys_advance_samples; /* scheduler advance in samples */
extern int sys_blocksize; /* audio I/O block size in sample frames */
extern t_float sys_dacsr;
extern int sys_schedadvance;
extern int sys_sleepgrain;
void sys_set_audio_settings(int naudioindev, int *audioindev,
int nchindev, int *chindev,
int naudiooutdev, int *audiooutdev, int nchoutdev, int *choutdev,
int srate, int advance, int callback);
void sys_reopen_audio( void);
void sys_close_audio(void);
int sys_send_dacs(void);
void sys_reportidle(void);
void sys_set_priority(int higher);
void sys_audiobuf(int nbufs);
void sys_getmeters(t_sample *inmax, t_sample *outmax);
void sys_listdevs(void);
void sys_setblocksize(int n);
EXTERN void sys_get_audio_devs(char *indevlist, int *nindevs,
char *outdevlist, int *noutdevs, int *canmulti, int *cancallback,
int maxndev, int devdescsize);
EXTERN void sys_get_audio_apis(char *buf);
/* s_midi.c */
#define MAXMIDIINDEV 16 /* max. number of input ports */
#define MAXMIDIOUTDEV 16 /* max. number of output ports */
extern int sys_midiapi;
extern int sys_nmidiin;
extern int sys_nmidiout;
extern int sys_midiindevlist[];
extern int sys_midioutdevlist[];
void sys_open_midi(int nmidiin, int *midiinvec,
int nmidiout, int *midioutvec, int enable);
EXTERN void sys_get_midi_apis(char *buf);
EXTERN void sys_get_midi_devs(char *indevlist, int *nindevs,
char *outdevlist, int *noutdevs,
int maxndev, int devdescsize);
void sys_get_midi_params(int *pnmidiindev, int *pmidiindev,
int *pnmidioutdev, int *pmidioutdev);
void sys_get_midi_apis(char *buf);
void sys_reopen_midi( void);
void sys_close_midi( void);
EXTERN void sys_putmidimess(int portno, int a, int b, int c);
EXTERN void sys_putmidibyte(int portno, int a);
EXTERN void sys_poll_midi(void);
EXTERN void sys_setmiditimediff(double inbuftime, double outbuftime);
EXTERN void sys_midibytein(int portno, int byte);
/* implemented in the system dependent MIDI code (s_midi_pm.c, etc. ) */
void midi_getdevs(char *indevlist, int *nindevs,
char *outdevlist, int *noutdevs, int maxndev, int devdescsize);
void sys_do_open_midi(int nmidiindev, int *midiindev,
int nmidioutdev, int *midioutdev);
#ifdef USEAPI_ALSA
EXTERN void sys_alsa_putmidimess(int portno, int a, int b, int c);
EXTERN void sys_alsa_putmidibyte(int portno, int a);
EXTERN void sys_alsa_poll_midi(void);
EXTERN void sys_alsa_setmiditimediff(double inbuftime, double outbuftime);
EXTERN void sys_alsa_midibytein(int portno, int byte);
EXTERN void sys_alsa_close_midi( void);
/* implemented in the system dependent MIDI code (s_midi_pm.c, etc. ) */
void midi_alsa_getdevs(char *indevlist, int *nindevs,
char *outdevlist, int *noutdevs, int maxndev, int devdescsize);
void sys_alsa_do_open_midi(int nmidiindev, int *midiindev,
int nmidioutdev, int *midioutdev);
#endif
/* m_sched.c */
EXTERN void sys_log_error(int type);
#define ERR_NOTHING 0
#define ERR_ADCSLEPT 1
#define ERR_DACSLEPT 2
#define ERR_RESYNC 3
#define ERR_DATALATE 4
#define SCHED_AUDIO_NONE 0
#define SCHED_AUDIO_POLL 1
#define SCHED_AUDIO_CALLBACK 2
void sched_set_using_audio(int flag);
/* s_inter.c */
EXTERN void sys_microsleep(int microsec);
EXTERN void sys_bail(int exitcode);
EXTERN int sys_pollgui(void);
EXTERN_STRUCT _socketreceiver;
#define t_socketreceiver struct _socketreceiver
typedef void (*t_socketnotifier)(void *x);
typedef void (*t_socketreceivefn)(void *x, t_binbuf *b);
EXTERN t_socketreceiver *socketreceiver_new(void *owner,
t_socketnotifier notifier, t_socketreceivefn socketreceivefn, int udp);
EXTERN void socketreceiver_read(t_socketreceiver *x, int fd);
EXTERN void sys_sockerror(char *s);
EXTERN void sys_closesocket(int fd);
typedef void (*t_fdpollfn)(void *ptr, int fd);
EXTERN void sys_addpollfn(int fd, t_fdpollfn fn, void *ptr);
EXTERN void sys_rmpollfn(int fd);
#ifdef UNIX
void sys_setalarm(int microsec);
void sys_setvirtualalarm( void);
#endif
#define API_NONE 0
#define API_ALSA 1
#define API_OSS 2
#define API_MMIO 3
#define API_PORTAUDIO 4
#define API_JACK 5
#define API_SGI 6
#ifdef __linux__
#define API_DEFAULT API_ALSA
#define API_DEFSTRING "ALSA"
#endif
#ifdef MSW
#define API_DEFAULT API_MMIO
#define API_DEFSTRING "MMIO"
#endif