annotate projects/basic_libpd/s_stuff.h @ 269:ac8eb07afcf5

Oxygen text added to each render.cpp file for the default projects. Text includes project explanation from Wiki, edited in places. Empty project added as a default project. Doxyfile updated. Each of the project locations added to INPUT configuration option. Consider just watching the whole project file so all new projects are automatically pulled through.
author Robert Jack <robert.h.jack@gmail.com>
date Tue, 17 May 2016 15:40:16 +0100
parents af211ee57867
children
rev   line source
giuliomoro@230 1 /* Copyright (c) 1997-1999 Miller Puckette.
giuliomoro@230 2 * For information on usage and redistribution, and for a DISCLAIMER OF ALL
giuliomoro@230 3 * WARRANTIES, see the file, "LICENSE.txt," in this distribution. */
giuliomoro@230 4
giuliomoro@230 5 /* Audio and MIDI I/O, and other scheduling and system stuff. */
giuliomoro@230 6
giuliomoro@230 7 /* NOTE: this file describes Pd implementation details which may change
giuliomoro@230 8 in future releases. The public (stable) API is in m_pd.h. */
giuliomoro@230 9
giuliomoro@230 10 /* in s_path.c */
giuliomoro@230 11
giuliomoro@230 12 typedef struct _namelist /* element in a linked list of stored strings */
giuliomoro@230 13 {
giuliomoro@230 14 struct _namelist *nl_next; /* next in list */
giuliomoro@230 15 char *nl_string; /* the string */
giuliomoro@230 16 } t_namelist;
giuliomoro@230 17
giuliomoro@230 18 t_namelist *namelist_append(t_namelist *listwas, const char *s, int allowdup);
giuliomoro@230 19 t_namelist *namelist_append_files(t_namelist *listwas, const char *s);
giuliomoro@230 20 void namelist_free(t_namelist *listwas);
giuliomoro@230 21 char *namelist_get(t_namelist *namelist, int n);
giuliomoro@230 22 void sys_setextrapath(const char *p);
giuliomoro@230 23 extern int sys_usestdpath;
giuliomoro@230 24 extern t_namelist *sys_externlist;
giuliomoro@230 25 extern t_namelist *sys_searchpath;
giuliomoro@230 26 extern t_namelist *sys_helppath;
giuliomoro@230 27 int sys_open_absolute(const char *name, const char* ext,
giuliomoro@230 28 char *dirresult, char **nameresult, unsigned int size, int bin, int *fdp);
giuliomoro@230 29 int sys_trytoopenone(const char *dir, const char *name, const char* ext,
giuliomoro@230 30 char *dirresult, char **nameresult, unsigned int size, int bin);
giuliomoro@230 31 t_symbol *sys_decodedialog(t_symbol *s);
giuliomoro@230 32
giuliomoro@230 33 /* s_file.c */
giuliomoro@230 34
giuliomoro@230 35 void sys_loadpreferences( void);
giuliomoro@230 36 void sys_savepreferences( void);
giuliomoro@230 37 extern int sys_defeatrt;
giuliomoro@230 38 extern t_symbol *sys_flags;
giuliomoro@230 39
giuliomoro@230 40 /* s_main.c */
giuliomoro@230 41 extern int sys_debuglevel;
giuliomoro@230 42 extern int sys_verbose;
giuliomoro@230 43 extern int sys_noloadbang;
giuliomoro@230 44 extern int sys_nogui;
giuliomoro@230 45 extern char *sys_guicmd;
giuliomoro@230 46
giuliomoro@230 47 EXTERN int sys_nearestfontsize(int fontsize);
giuliomoro@230 48 EXTERN int sys_hostfontsize(int fontsize);
giuliomoro@230 49
giuliomoro@230 50 extern int sys_defaultfont;
giuliomoro@230 51 EXTERN t_symbol *sys_libdir; /* library directory for auxilliary files */
giuliomoro@230 52 extern t_symbol *sys_guidir; /* directory holding pd_gui, u_pdsend, etc */
giuliomoro@230 53
giuliomoro@230 54 /* s_loader.c */
giuliomoro@230 55
giuliomoro@230 56 typedef int (*loader_t)(t_canvas *canvas, char *classname); /* callback type */
giuliomoro@230 57 EXTERN int sys_load_lib(t_canvas *canvas, char *filename);
giuliomoro@230 58 EXTERN void sys_register_loader(loader_t loader);
giuliomoro@230 59
giuliomoro@230 60 /* s_audio.c */
giuliomoro@230 61
giuliomoro@230 62 #define SENDDACS_NO 0 /* return values for sys_send_dacs() */
giuliomoro@230 63 #define SENDDACS_YES 1
giuliomoro@230 64 #define SENDDACS_SLEPT 2
giuliomoro@230 65
giuliomoro@230 66 #define DEFDACBLKSIZE 8
giuliomoro@230 67 extern int sys_schedblocksize; /* audio block size for scheduler */
giuliomoro@230 68 extern int sys_hipriority; /* real-time flag, true if priority boosted */
giuliomoro@230 69 EXTERN t_sample *sys_soundout;
giuliomoro@230 70 EXTERN t_sample *sys_soundin;
giuliomoro@230 71 extern int sys_inchannels;
giuliomoro@230 72 extern int sys_outchannels;
giuliomoro@230 73 extern int sys_advance_samples; /* scheduler advance in samples */
giuliomoro@230 74 extern int sys_blocksize; /* audio I/O block size in sample frames */
giuliomoro@230 75 extern t_float sys_dacsr;
giuliomoro@230 76 extern int sys_schedadvance;
giuliomoro@230 77 extern int sys_sleepgrain;
giuliomoro@230 78 EXTERN void sys_set_audio_settings(int naudioindev, int *audioindev,
giuliomoro@230 79 int nchindev, int *chindev,
giuliomoro@230 80 int naudiooutdev, int *audiooutdev, int nchoutdev, int *choutdev,
giuliomoro@230 81 int srate, int advance, int callback, int blocksize);
giuliomoro@230 82 /* the same as above, but reopens the audio subsystem if needed */
giuliomoro@230 83 EXTERN void sys_set_audio_settings_reopen(int naudioindev, int *audioindev,
giuliomoro@230 84 int nchindev, int *chindev,
giuliomoro@230 85 int naudiooutdev, int *audiooutdev, int nchoutdev, int *choutdev,
giuliomoro@230 86 int srate, int advance, int callback, int blocksize);
giuliomoro@230 87 EXTERN void sys_reopen_audio( void);
giuliomoro@230 88 EXTERN void sys_close_audio(void);
giuliomoro@230 89 /* return true if the interface prefers always being open (ala jack) : */
giuliomoro@230 90 EXTERN int audio_shouldkeepopen( void);
giuliomoro@230 91 EXTERN int audio_isopen( void); /* true if audio interface is open */
giuliomoro@230 92 EXTERN int sys_audiodevnametonumber(int output, const char *name);
giuliomoro@230 93 EXTERN void sys_audiodevnumbertoname(int output, int devno, char *name,
giuliomoro@230 94 int namesize);
giuliomoro@230 95
giuliomoro@230 96 int sys_send_dacs(void);
giuliomoro@230 97 void sys_reportidle(void);
giuliomoro@230 98 void sys_set_priority(int higher);
giuliomoro@230 99 void sys_audiobuf(int nbufs);
giuliomoro@230 100 void sys_getmeters(t_sample *inmax, t_sample *outmax);
giuliomoro@230 101 void sys_listdevs(void);
giuliomoro@230 102 void sys_setblocksize(int n);
giuliomoro@230 103
giuliomoro@230 104 EXTERN void sys_get_audio_devs(char *indevlist, int *nindevs,
giuliomoro@230 105 char *outdevlist, int *noutdevs, int *canmulti, int *cancallback,
giuliomoro@230 106 int maxndev, int devdescsize);
giuliomoro@230 107 EXTERN void sys_get_audio_apis(char *buf);
giuliomoro@230 108
giuliomoro@230 109 /* s_midi.c */
giuliomoro@230 110 #define MAXMIDIINDEV 16 /* max. number of input ports */
giuliomoro@230 111 #define MAXMIDIOUTDEV 16 /* max. number of output ports */
giuliomoro@230 112 extern int sys_midiapi;
giuliomoro@230 113 extern int sys_nmidiin;
giuliomoro@230 114 extern int sys_nmidiout;
giuliomoro@230 115 extern int sys_midiindevlist[];
giuliomoro@230 116 extern int sys_midioutdevlist[];
giuliomoro@230 117
giuliomoro@230 118 EXTERN void sys_open_midi(int nmidiin, int *midiinvec,
giuliomoro@230 119 int nmidiout, int *midioutvec, int enable);
giuliomoro@230 120
giuliomoro@230 121 EXTERN void sys_get_midi_apis(char *buf);
giuliomoro@230 122 EXTERN void sys_get_midi_devs(char *indevlist, int *nindevs,
giuliomoro@230 123 char *outdevlist, int *noutdevs,
giuliomoro@230 124 int maxndev, int devdescsize);
giuliomoro@230 125 EXTERN void sys_get_midi_params(int *pnmidiindev, int *pmidiindev,
giuliomoro@230 126 int *pnmidioutdev, int *pmidioutdev);
giuliomoro@230 127 EXTERN int sys_mididevnametonumber(int output, const char *name);
giuliomoro@230 128 EXTERN void sys_mididevnumbertoname(int output, int devno, char *name,
giuliomoro@230 129 int namesize);
giuliomoro@230 130
giuliomoro@230 131 EXTERN void sys_reopen_midi( void);
giuliomoro@230 132 EXTERN void sys_close_midi( void);
giuliomoro@230 133 EXTERN void sys_putmidimess(int portno, int a, int b, int c);
giuliomoro@230 134 EXTERN void sys_putmidibyte(int portno, int a);
giuliomoro@230 135 EXTERN void sys_poll_midi(void);
giuliomoro@230 136 EXTERN void sys_setmiditimediff(double inbuftime, double outbuftime);
giuliomoro@230 137 EXTERN void sys_midibytein(int portno, int byte);
giuliomoro@230 138
giuliomoro@230 139 /* implemented in the system dependent MIDI code (s_midi_pm.c, etc. ) */
giuliomoro@230 140 void midi_getdevs(char *indevlist, int *nindevs,
giuliomoro@230 141 char *outdevlist, int *noutdevs, int maxndev, int devdescsize);
giuliomoro@230 142 void sys_do_open_midi(int nmidiindev, int *midiindev,
giuliomoro@230 143 int nmidioutdev, int *midioutdev);
giuliomoro@230 144
giuliomoro@230 145 #ifdef USEAPI_ALSA
giuliomoro@230 146 EXTERN void sys_alsa_putmidimess(int portno, int a, int b, int c);
giuliomoro@230 147 EXTERN void sys_alsa_putmidibyte(int portno, int a);
giuliomoro@230 148 EXTERN void sys_alsa_poll_midi(void);
giuliomoro@230 149 EXTERN void sys_alsa_setmiditimediff(double inbuftime, double outbuftime);
giuliomoro@230 150 EXTERN void sys_alsa_midibytein(int portno, int byte);
giuliomoro@230 151 EXTERN void sys_alsa_close_midi( void);
giuliomoro@230 152
giuliomoro@230 153
giuliomoro@230 154 /* implemented in the system dependent MIDI code (s_midi_pm.c, etc. ) */
giuliomoro@230 155 void midi_alsa_getdevs(char *indevlist, int *nindevs,
giuliomoro@230 156 char *outdevlist, int *noutdevs, int maxndev, int devdescsize);
giuliomoro@230 157 void sys_alsa_do_open_midi(int nmidiindev, int *midiindev,
giuliomoro@230 158 int nmidioutdev, int *midioutdev);
giuliomoro@230 159 #endif
giuliomoro@230 160
giuliomoro@230 161 /* m_sched.c */
giuliomoro@230 162 EXTERN void sys_log_error(int type);
giuliomoro@230 163 #define ERR_NOTHING 0
giuliomoro@230 164 #define ERR_ADCSLEPT 1
giuliomoro@230 165 #define ERR_DACSLEPT 2
giuliomoro@230 166 #define ERR_RESYNC 3
giuliomoro@230 167 #define ERR_DATALATE 4
giuliomoro@230 168
giuliomoro@230 169 #define SCHED_AUDIO_NONE 0
giuliomoro@230 170 #define SCHED_AUDIO_POLL 1
giuliomoro@230 171 #define SCHED_AUDIO_CALLBACK 2
giuliomoro@230 172 void sched_set_using_audio(int flag);
giuliomoro@230 173
giuliomoro@230 174 /* s_inter.c */
giuliomoro@230 175
giuliomoro@230 176 EXTERN void sys_microsleep(int microsec);
giuliomoro@230 177 EXTERN void sys_init_fdpoll(void);
giuliomoro@230 178
giuliomoro@230 179 EXTERN void sys_bail(int exitcode);
giuliomoro@230 180 EXTERN int sys_pollgui(void);
giuliomoro@230 181
giuliomoro@230 182 EXTERN_STRUCT _socketreceiver;
giuliomoro@230 183 #define t_socketreceiver struct _socketreceiver
giuliomoro@230 184
giuliomoro@230 185 typedef void (*t_socketnotifier)(void *x, int n);
giuliomoro@230 186 typedef void (*t_socketreceivefn)(void *x, t_binbuf *b);
giuliomoro@230 187
giuliomoro@230 188 EXTERN t_socketreceiver *socketreceiver_new(void *owner,
giuliomoro@230 189 t_socketnotifier notifier, t_socketreceivefn socketreceivefn, int udp);
giuliomoro@230 190 EXTERN void socketreceiver_read(t_socketreceiver *x, int fd);
giuliomoro@230 191 EXTERN void sys_sockerror(char *s);
giuliomoro@230 192 EXTERN void sys_closesocket(int fd);
giuliomoro@230 193
giuliomoro@230 194 typedef void (*t_fdpollfn)(void *ptr, int fd);
giuliomoro@230 195 EXTERN void sys_addpollfn(int fd, t_fdpollfn fn, void *ptr);
giuliomoro@230 196 EXTERN void sys_rmpollfn(int fd);
giuliomoro@230 197 #if defined(USEAPI_OSS) || defined(USEAPI_ALSA)
giuliomoro@230 198 void sys_setalarm(int microsec);
giuliomoro@230 199 #endif
giuliomoro@230 200
giuliomoro@230 201 #define API_NONE 0
giuliomoro@230 202 #define API_ALSA 1
giuliomoro@230 203 #define API_OSS 2
giuliomoro@230 204 #define API_MMIO 3
giuliomoro@230 205 #define API_PORTAUDIO 4
giuliomoro@230 206 #define API_JACK 5
giuliomoro@230 207 #define API_SGI 6 /* gone */
giuliomoro@230 208 #define API_AUDIOUNIT 7
giuliomoro@230 209 #define API_ESD 8 /* no idea what this was, probably gone now */
giuliomoro@230 210 #define API_DUMMY 9
giuliomoro@230 211
giuliomoro@230 212 /* figure out which API should be the default. The one we judge most
giuliomoro@230 213 likely to offer a working device takes precedence so that if you
giuliomoro@230 214 start up Pd for the first time there's a reasonable chance you'll have
giuliomoro@230 215 sound. (You'd think portaudio would be best but it seems to default
giuliomoro@230 216 to jack on linux, and and on Windows we only use it for ASIO).
giuliomoro@230 217 If nobody shows up, define DUMMY and make it the default.*/
giuliomoro@230 218 #if defined(USEAPI_MMIO)
giuliomoro@230 219 # define API_DEFAULT API_MMIO
giuliomoro@230 220 # define API_DEFSTRING "MMIO"
giuliomoro@230 221 #elif defined(USEAPI_ALSA)
giuliomoro@230 222 # define API_DEFAULT API_ALSA
giuliomoro@230 223 # define API_DEFSTRING "ALSA"
giuliomoro@230 224 #elif defined(USEAPI_OSS)
giuliomoro@230 225 # define API_DEFAULT API_OSS
giuliomoro@230 226 # define API_DEFSTRING "OSS"
giuliomoro@230 227 #elif defined(USEAPI_AUDIOUNIT)
giuliomoro@230 228 # define API_DEFAULT API_AUDIOUNIT
giuliomoro@230 229 # define API_DEFSTRING "AudioUnit"
giuliomoro@230 230 #elif defined(USEAPI_ESD)
giuliomoro@230 231 # define API_DEFAULT API_ESD
giuliomoro@230 232 # define API_DEFSTRING "ESD (?)"
giuliomoro@230 233 #elif defined(USEAPI_PORTAUDIO)
giuliomoro@230 234 # define API_DEFAULT API_PORTAUDIO
giuliomoro@230 235 # define API_DEFSTRING "portaudio"
giuliomoro@230 236 #elif defined(USEAPI_JACK)
giuliomoro@230 237 # define API_DEFAULT API_JACK
giuliomoro@230 238 # define API_DEFSTRING "Jack audio connection kit"
giuliomoro@230 239 #else
giuliomoro@230 240 # ifndef USEAPI_DUMMY /* we need at least one so bring in the dummy */
giuliomoro@230 241 # define USEAPI_DUMMY
giuliomoro@230 242 # endif /* USEAPI_DUMMY */
giuliomoro@230 243 # define API_DEFAULT API_DUMMY
giuliomoro@230 244 # define API_DEFSTRING "dummy audio"
giuliomoro@230 245 #endif
giuliomoro@230 246
giuliomoro@230 247 #define DEFAULTAUDIODEV 0
giuliomoro@230 248
giuliomoro@230 249 #define MAXAUDIOINDEV 4
giuliomoro@230 250 #define MAXAUDIOOUTDEV 4
giuliomoro@230 251
giuliomoro@230 252 #define DEFMIDIDEV 0
giuliomoro@230 253
giuliomoro@230 254 #define DEFAULTSRATE 44100
giuliomoro@230 255 #ifdef _WIN32
giuliomoro@230 256 #define DEFAULTADVANCE 80
giuliomoro@230 257 #else
giuliomoro@230 258 #ifdef __APPLE__
giuliomoro@230 259 #define DEFAULTADVANCE 5 /* this is in addition to their own delay */
giuliomoro@230 260 #else
giuliomoro@230 261 #define DEFAULTADVANCE 25
giuliomoro@230 262 #endif
giuliomoro@230 263 #endif
giuliomoro@230 264
giuliomoro@230 265 typedef void (*t_audiocallback)(void);
giuliomoro@230 266
giuliomoro@230 267 int pa_open_audio(int inchans, int outchans, int rate, t_sample *soundin,
giuliomoro@230 268 t_sample *soundout, int framesperbuf, int nbuffers,
giuliomoro@230 269 int indeviceno, int outdeviceno, t_audiocallback callback);
giuliomoro@230 270 void pa_close_audio(void);
giuliomoro@230 271 int pa_send_dacs(void);
giuliomoro@230 272 void sys_reportidle(void);
giuliomoro@230 273 void pa_listdevs(void);
giuliomoro@230 274 void pa_getdevs(char *indevlist, int *nindevs,
giuliomoro@230 275 char *outdevlist, int *noutdevs, int *canmulti,
giuliomoro@230 276 int maxndev, int devdescsize);
giuliomoro@230 277
giuliomoro@230 278 int oss_open_audio(int naudioindev, int *audioindev, int nchindev,
giuliomoro@230 279 int *chindev, int naudiooutdev, int *audiooutdev, int nchoutdev,
giuliomoro@230 280 int *choutdev, int rate, int blocksize);
giuliomoro@230 281 void oss_close_audio(void);
giuliomoro@230 282 int oss_send_dacs(void);
giuliomoro@230 283 void oss_reportidle(void);
giuliomoro@230 284 void oss_getdevs(char *indevlist, int *nindevs,
giuliomoro@230 285 char *outdevlist, int *noutdevs, int *canmulti,
giuliomoro@230 286 int maxndev, int devdescsize);
giuliomoro@230 287
giuliomoro@230 288 int alsa_open_audio(int naudioindev, int *audioindev, int nchindev,
giuliomoro@230 289 int *chindev, int naudiooutdev, int *audiooutdev, int nchoutdev,
giuliomoro@230 290 int *choutdev, int rate, int blocksize);
giuliomoro@230 291 void alsa_close_audio(void);
giuliomoro@230 292 int alsa_send_dacs(void);
giuliomoro@230 293 void alsa_reportidle(void);
giuliomoro@230 294 void alsa_getdevs(char *indevlist, int *nindevs,
giuliomoro@230 295 char *outdevlist, int *noutdevs, int *canmulti,
giuliomoro@230 296 int maxndev, int devdescsize);
giuliomoro@230 297
giuliomoro@230 298 int jack_open_audio(int wantinchans, int wantoutchans, int srate,
giuliomoro@230 299 t_audiocallback callback);
giuliomoro@230 300 void jack_close_audio(void);
giuliomoro@230 301 int jack_send_dacs(void);
giuliomoro@230 302 void jack_reportidle(void);
giuliomoro@230 303 void jack_getdevs(char *indevlist, int *nindevs,
giuliomoro@230 304 char *outdevlist, int *noutdevs, int *canmulti,
giuliomoro@230 305 int maxndev, int devdescsize);
giuliomoro@230 306 void jack_listdevs(void);
giuliomoro@230 307
giuliomoro@230 308 int mmio_open_audio(int naudioindev, int *audioindev,
giuliomoro@230 309 int nchindev, int *chindev, int naudiooutdev, int *audiooutdev,
giuliomoro@230 310 int nchoutdev, int *choutdev, int rate, int blocksize);
giuliomoro@230 311 void mmio_close_audio( void);
giuliomoro@230 312 void mmio_reportidle(void);
giuliomoro@230 313 int mmio_send_dacs(void);
giuliomoro@230 314 void mmio_getdevs(char *indevlist, int *nindevs,
giuliomoro@230 315 char *outdevlist, int *noutdevs, int *canmulti,
giuliomoro@230 316 int maxndev, int devdescsize);
giuliomoro@230 317
giuliomoro@230 318 int audiounit_open_audio(int naudioindev, int *audioindev, int nchindev,
giuliomoro@230 319 int *chindev, int naudiooutdev, int *audiooutdev, int nchoutdev,
giuliomoro@230 320 int *choutdev, int rate);
giuliomoro@230 321 void audiounit_close_audio(void);
giuliomoro@230 322 int audiounit_send_dacs(void);
giuliomoro@230 323 void audiounit_listdevs(void);
giuliomoro@230 324 void audiounit_getdevs(char *indevlist, int *nindevs,
giuliomoro@230 325 char *outdevlist, int *noutdevs, int *canmulti,
giuliomoro@230 326 int maxndev, int devdescsize);
giuliomoro@230 327
giuliomoro@230 328 int esd_open_audio(int naudioindev, int *audioindev, int nchindev,
giuliomoro@230 329 int *chindev, int naudiooutdev, int *audiooutdev, int nchoutdev,
giuliomoro@230 330 int *choutdev, int rate);
giuliomoro@230 331 void esd_close_audio(void);
giuliomoro@230 332 int esd_send_dacs(void);
giuliomoro@230 333 void esd_listdevs(void);
giuliomoro@230 334 void esd_getdevs(char *indevlist, int *nindevs,
giuliomoro@230 335 char *outdevlist, int *noutdevs, int *canmulti,
giuliomoro@230 336 int maxndev, int devdescsize);
giuliomoro@230 337
giuliomoro@230 338 int dummy_open_audio(int nin, int nout, int sr);
giuliomoro@230 339 int dummy_close_audio( void);
giuliomoro@230 340 int dummy_send_dacs( void);
giuliomoro@230 341 void dummy_getdevs(char *indevlist, int *nindevs, char *outdevlist,
giuliomoro@230 342 int *noutdevs, int *canmulti, int maxndev, int devdescsize);
giuliomoro@230 343 void dummy_listdevs( void);
giuliomoro@230 344
giuliomoro@230 345 void sys_listmididevs(void);
giuliomoro@230 346 EXTERN void sys_set_midi_api(int whichapi);
giuliomoro@230 347 EXTERN void sys_set_audio_api(int whichapi);
giuliomoro@230 348 EXTERN int sys_audioapi;
giuliomoro@230 349 EXTERN void sys_set_audio_state(int onoff);
giuliomoro@230 350
giuliomoro@230 351 /* API dependent audio flags and settings */
giuliomoro@230 352 void oss_set32bit( void);
giuliomoro@230 353 void linux_alsa_devname(char *devname);
giuliomoro@230 354
giuliomoro@230 355 EXTERN void sys_get_audio_params(
giuliomoro@230 356 int *pnaudioindev, int *paudioindev, int *chindev,
giuliomoro@230 357 int *pnaudiooutdev, int *paudiooutdev, int *choutdev,
giuliomoro@230 358 int *prate, int *padvance, int *callback, int *blocksize);
giuliomoro@230 359 void sys_save_audio_params(
giuliomoro@230 360 int naudioindev, int *audioindev, int *chindev,
giuliomoro@230 361 int naudiooutdev, int *audiooutdev, int *choutdev,
giuliomoro@230 362 int rate, int advance, int callback, int blocksize);
giuliomoro@230 363
giuliomoro@230 364 /* s_file.c */
giuliomoro@230 365
giuliomoro@230 366 typedef void (*t_printhook)(const char *s);
giuliomoro@230 367 extern t_printhook sys_printhook; /* set this to override printing */
giuliomoro@230 368 extern int sys_printtostderr;
giuliomoro@230 369
giuliomoro@230 370 /* jsarlo { */
giuliomoro@230 371
giuliomoro@230 372 EXTERN double sys_time;
giuliomoro@230 373 EXTERN double sys_time_per_dsp_tick;
giuliomoro@230 374 EXTERN int sys_externalschedlib;
giuliomoro@230 375
giuliomoro@230 376 EXTERN t_sample* get_sys_soundout(void ) ;
giuliomoro@230 377 EXTERN t_sample* get_sys_soundin(void ) ;
giuliomoro@230 378 EXTERN int* get_sys_main_advance(void ) ;
giuliomoro@230 379 EXTERN double* get_sys_time_per_dsp_tick(void ) ;
giuliomoro@230 380 EXTERN int* get_sys_schedblocksize(void ) ;
giuliomoro@230 381 EXTERN double* get_sys_time(void ) ;
giuliomoro@230 382 EXTERN t_float* get_sys_dacsr(void ) ;
giuliomoro@230 383 EXTERN int* get_sys_sleepgrain(void ) ;
giuliomoro@230 384 EXTERN int* get_sys_schedadvance(void ) ;
giuliomoro@230 385
giuliomoro@230 386 EXTERN void sys_clearhist(void );
giuliomoro@230 387 EXTERN void sys_initmidiqueue(void );
giuliomoro@230 388 EXTERN int sys_addhist(int phase);
giuliomoro@230 389 EXTERN void sys_setmiditimediff(double inbuftime, double outbuftime);
giuliomoro@230 390 EXTERN void sched_tick( void);
giuliomoro@230 391 EXTERN void sys_pollmidiqueue(void );
giuliomoro@230 392 EXTERN int sys_pollgui(void );
giuliomoro@230 393 EXTERN void sys_setchsr(int chin, int chout, int sr);
giuliomoro@230 394
giuliomoro@230 395 EXTERN void inmidi_realtimein(int portno, int cmd);
giuliomoro@230 396 EXTERN void inmidi_byte(int portno, int byte);
giuliomoro@230 397 EXTERN void inmidi_sysex(int portno, int byte);
giuliomoro@230 398 EXTERN void inmidi_noteon(int portno, int channel, int pitch, int velo);
giuliomoro@230 399 EXTERN void inmidi_controlchange(int portno,
giuliomoro@230 400 int channel,
giuliomoro@230 401 int ctlnumber,
giuliomoro@230 402 int value);
giuliomoro@230 403 EXTERN void inmidi_programchange(int portno, int channel, int value);
giuliomoro@230 404 EXTERN void inmidi_pitchbend(int portno, int channel, int value);
giuliomoro@230 405 EXTERN void inmidi_aftertouch(int portno, int channel, int value);
giuliomoro@230 406 EXTERN void inmidi_polyaftertouch(int portno,
giuliomoro@230 407 int channel,
giuliomoro@230 408 int pitch,
giuliomoro@230 409 int value);
giuliomoro@230 410 /* } jsarlo */
giuliomoro@230 411 extern t_widgetbehavior text_widgetbehavior;